API Overview
Understand base URLs, versioning, and conventions before you build.
Our public REST API is currently versioned at v1. All production endpoints live under /v1.
Base URL
https://api.dnscale.eu/v1Authentication
Every API request requires authentication via a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEYAPI keys are scoped to a customer account and carry permissions that control what operations they can perform. See Authentication for details.
Customer Context
The DNScale API uses customer context from your API key. You don't need to specify a customer ID in endpoints—the API automatically determines your customer from the authenticated API key.
Endpoint Reference
Core Resources
| Resource | Endpoints | Description |
|---|---|---|
| Zones | /v1/zones | Create and manage DNS zones |
| Records | /v1/zones/{zone_id}/records | Manage DNS records within zones |
| DNSSEC | /v1/zones/{zone_id}/dnssec | DNSSEC key management |
Account Management
| Resource | Endpoints | Description |
|---|---|---|
| Users | /v1/users | Manage team members |
| API Keys | /v1/users/{user_id}/apikeys | Create and manage API keys |
| Invitations | /v1/invitations-admin | Invite team members |
Usage & Billing
| Resource | Endpoints | Description |
|---|---|---|
| Usage | /v1/usage | Query usage statistics |
| Billing | /v1/billing | Billing summaries and history |
Observability
| Resource | Endpoints | Description |
|---|---|---|
| Alerts | /v1/alerts | Configure Scale and Enterprise DNS traffic alerts |
| Activity | /v1/activity | Query account activity and audit logs |
Automation
| Resource | Endpoints | Description |
|---|---|---|
| DNScale DNS Control Beta | /v1/dns-sources, /v1/dns-inventory | Public beta for read-only external provider inventory, DNS state snapshots, and drift review |
Request Format
All POST, PUT, and PATCH requests must include:
Content-Type: application/jsonRequest bodies should be valid JSON:
curl -X POST https://api.dnscale.eu/v1/zones \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example.com",
"type": "primary"
}'Response Format
All responses use a consistent envelope:
Success Response
{
"status": "success",
"data": {
"id": "zone_123",
"name": "example.com",
"type": "primary"
}
}Collection Response
{
"status": "success",
"data": {
"items": [...],
"total": 42,
"limit": 20,
"offset": 0
}
}Error Response
{
"status": "error",
"error": {
"code": "validation_failed",
"message": "Record type is required",
"details": {
"type": "This field is required"
}
}
}Pagination
Collection endpoints accept limit and offset query parameters:
GET /v1/zones?limit=20&offset=0Scroll horizontally to see all columns →
| Parameter | Default | Maximum | Description |
|---|---|---|---|
limit | 10 | 100 | Number of items per page |
offset | 0 | - | Number of items to skip |
Rate Limiting
The API enforces rate limits to ensure fair usage:
- Standard endpoints: 100 requests per minute
- Authentication endpoints: 10 requests per 5 minutes
- Email-sending endpoints: 3 requests per hour
When rate limited, you'll receive a 429 Too Many Requests response.
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
202 | Accepted (async operation started) |
400 | Bad Request (validation error) |
401 | Unauthorized (missing or invalid API key) |
403 | Forbidden (insufficient permissions) |
404 | Not Found |
429 | Too Many Requests (rate limited) |
500 | Internal Server Error |
SDKs and Tools
The official DNScale TypeScript SDK is published on npm as @dnscale/dnscale. Version 1.0.0 supports TypeScript and JavaScript on Node.js 20.19 and newer, using ES modules, with typed zone and record helpers, async pagination, cancellation, and structured errors.
npm install @dnscale/dnscale@1.0.0Set DNSCALE_API_KEY in your server environment. See the TypeScript and Node.js guide for complete examples, or browse the source on GitHub. The typed client at dns.api covers the wider public API contract.
The official DNScale Python SDK is available for Python 3.10 and newer. It includes typed zone and record helpers, pagination iterators, synchronous and asynchronous calls, and generated clients for the wider API contract.
python -m pip install dnscaleSet DNSCALE_API_KEY to a key with zones:read permission, then list the zones it can access:
from dnscale import DNScale
with DNScale() as dns:
for zone in dns.zones.iter():
print(zone.id, zone.name)See the Python SDK guide for authentication, zone and record examples, async calls, and error handling. The package is on PyPI and the source is on GitHub.
The official DNScale Go SDK supports Go 1.25 and newer, with typed zone and record helpers, pagination iterators, context deadlines, and structured errors.
go get github.com/dnscaleou/dnscale-goSee the Go SDK guide for complete examples, or browse the source on GitHub. The generated client at dns.API covers the wider public API contract.
All three SDKs use the same API permissions and limits. Automatic retries are limited to safe reads; changes are never automatically retried. Browse the SDKs learning section for SDK tutorials.
The REST API also works with:
- curl - Command-line examples throughout this documentation
- Postman - Import our OpenAPI spec
- Terraform - Use our DNScale Terraform provider for infrastructure as code
- DNSControl - Use the DNScale provider for DNS as code
- Ansible - Use the
urimodule for DNS automation