Records
Create, update, and delete DNS records within zones.
Overview
DNS records define how your domain responds to queries. DNScale supports all standard record types plus modern types like HTTPS and SVCB.
Required scopes: zones:read + records:read (read), zones:read + records:write (write).
Record routes are nested under
/v1/zones/{zone_id}/records, so every record operation also requireszones:readto look up the parent zone. A key with onlyrecords:*will return403.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/zones/{zone_id}/records | Create a record |
GET | /v1/zones/{zone_id}/records | List all records |
GET | /v1/zones/{zone_id}/records/{record_id} | Get a record |
PUT | /v1/zones/{zone_id}/records/{record_id} | Update a record |
PUT | /v1/zones/{zone_id}/records/by-name/{name}/{type} | Update by name/type |
DELETE | /v1/zones/{zone_id}/records/{record_id} | Delete a record |
DELETE | /v1/zones/{zone_id}/records/by-name/{name}/{type} | Delete by name/type |
Supported Record Types
DNScale supports 14 record types:
| Type | Description | Documentation |
|---|---|---|
| A | IPv4 address | A Record Guide |
| AAAA | IPv6 address | AAAA Record Guide |
| CNAME | Canonical name (alias) | CNAME Guide |
| MX | Mail exchange | MX Record Guide |
| TXT | Text data (SPF, DKIM, etc.) | TXT Record Guide |
| NS | Nameserver delegation | NS Record Guide |
| SRV | Service location | SRV Record Guide |
| PTR | Reverse DNS | PTR Record Guide |
| CAA | Certificate authority authorization | CAA Record Guide |
| TLSA | TLS certificate association (DANE) | TLSA Record Guide |
| SSHFP | SSH fingerprint | SSHFP Record Guide |
| HTTPS | HTTPS service binding | HTTPS Record Guide |
| SVCB | General service binding | SVCB Record Guide |
| ALIAS | CNAME-like at apex | ALIAS Record Guide |
Create a Record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "www",
"type": "A",
"content": "192.0.2.1",
"ttl": 3600
}'Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Record name (@ for apex, or subdomain) |
type | string | Yes | Record type (A, AAAA, CNAME, etc.) |
content | string | Yes | Record value |
ttl | integer | No | Time to live in seconds (default: zone TTL) |
disabled | boolean | No | Whether record is disabled (default: false) |
Response:
{
"status": "success",
"data": {
"message": "Record created successfully",
"record": {
"id": "rec_abc123",
"name": "www.example.com.",
"type": "A",
"content": "192.0.2.1",
"ttl": 3600,
"disabled": false
}
}
}Record Type Examples
A Record (IPv4)
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "A",
"content": "192.0.2.1",
"ttl": 3600
}'AAAA Record (IPv6)
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "AAAA",
"content": "2001:db8::1",
"ttl": 3600
}'CNAME Record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "www",
"type": "CNAME",
"content": "example.com",
"ttl": 3600
}'MX Record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "MX",
"content": "10 mail.example.com",
"ttl": 3600
}'TXT Record (SPF)
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "TXT",
"content": "v=spf1 include:_spf.google.com ~all",
"ttl": 3600
}'SRV Record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "_sip._tcp",
"type": "SRV",
"content": "10 5 5060 sip.example.com",
"ttl": 3600
}'CAA Record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "CAA",
"content": "0 issue \"letsencrypt.org\"",
"ttl": 3600
}'HTTPS Record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "HTTPS",
"content": "1 . alpn=\"h3,h2\"",
"ttl": 3600
}'ALIAS Record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "ALIAS",
"content": "myapp.herokuapp.com",
"ttl": 3600
}'List Records
Retrieve all records in a zone:
curl "https://api.dnscale.eu/v1/zones/{zone_id}/records?limit=100" \
-H "Authorization: Bearer YOUR_API_KEY"Query Parameters:
| Parameter | Default | Description |
|---|---|---|
limit | 10 | Records per page (max: 100) |
offset | 0 | Records to skip |
Response:
{
"status": "success",
"data": {
"items": [
{
"id": "rec_abc123",
"name": "example.com.",
"type": "A",
"content": "192.0.2.1",
"ttl": 3600
},
{
"id": "rec_def456",
"name": "www.example.com.",
"type": "CNAME",
"content": "example.com.",
"ttl": 3600
}
],
"total": 15,
"limit": 100,
"offset": 0
}
}Get a Record
curl https://api.dnscale.eu/v1/zones/{zone_id}/records/{record_id} \
-H "Authorization: Bearer YOUR_API_KEY"Update a Record
By Record ID
curl -X PUT https://api.dnscale.eu/v1/zones/{zone_id}/records/{record_id} \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "www",
"type": "A",
"content": "192.0.2.2",
"ttl": 300
}'The name and type in the body must match the record_id; mismatches return 400.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Record name (must match record_id) |
type | string | Yes | Record type (must match record_id) |
content | string | Yes | New record value |
ttl | integer | Yes | New TTL in seconds |
disabled | boolean | No | Enable/disable the record |
Note: Record IDs are derived from
name,type, andcontent, so updatingcontentreturns a record with a new ID. To update a record without tracking its ID, use theby-nameendpoint below.
By Name and Type
Useful when you want to rotate a record's content without first looking up its ID:
curl -X PUT "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/www/A" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "192.0.2.2",
"ttl": 300
}'For multi-value record types (A, AAAA, MX, NS, TXT, SRV, CAA, TLSA, SSHFP, HTTPS, SVCB), append ?content= to identify which value to update:
curl -X PUT "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/www/A?content=192.0.2.1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "192.0.2.5",
"ttl": 300
}'Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | New record value |
ttl | integer | Yes | New TTL in seconds |
disabled | boolean | No | Enable/disable the record |
Delete a Record
By Record ID
curl -X DELETE https://api.dnscale.eu/v1/zones/{zone_id}/records/{record_id} \
-H "Authorization: Bearer YOUR_API_KEY"By Name and Type
Useful for deleting records when you know the name and type but not the ID:
curl -X DELETE "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/_acme-challenge/TXT" \
-H "Authorization: Bearer YOUR_API_KEY"For multi-value records, append ?content= to delete a specific value:
curl -X DELETE "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/www/A?content=192.0.2.1" \
-H "Authorization: Bearer YOUR_API_KEY"Multi-Value Records
Some record types support multiple values (e.g., multiple A records for round-robin):
# Add first A record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "www", "type": "A", "content": "192.0.2.1", "ttl": 300}'
# Add second A record (same name, same type)
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "www", "type": "A", "content": "192.0.2.2", "ttl": 300}'Multi-value record types: A, AAAA, MX, NS, TXT, SRV, CAA, TLSA, SSHFP, HTTPS, SVCB
Single-value record types: CNAME, ALIAS
ACME DNS-01 Challenge Example
Automate Let's Encrypt certificate validation:
# Create challenge record
curl -X POST https://api.dnscale.eu/v1/zones/{zone_id}/records \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "_acme-challenge",
"type": "TXT",
"content": "validation-token-from-acme-server",
"ttl": 60
}'
# After validation, clean up
curl -X DELETE "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/_acme-challenge/TXT" \
-H "Authorization: Bearer YOUR_API_KEY"Common Errors
| Error | Cause | Solution |
|---|---|---|
record_already_exists | Duplicate single-value record | Delete existing record first |
invalid_record_content | Malformed record value | Check content format for the record type |
cname_conflict | CNAME with other records at same name | CNAME must be the only record at a name |
zone_not_found | Invalid zone ID | Verify zone exists and you have access |