DNAbyD3Docs

Records

Read and change a domain’s DNS records.

GET/domains/{domain}/records

Filters match exactly, and each may appear once. A pending or moved domain lists no records. TXT values can come back in quotes, and a long one split into several quoted strings; content matches the value as listed.

AuthorizationBearer <token>

An API key (d3_k_…) from the dashboard’s API keys page.

In: header

Path Parameters

domain*string

The domain’s name, such as example.com.

Query Parameters

name?string

Exact name: www, @ or www.example.com.

type?string

Exact type, such as TXT.

content?string

Exact value, as the list shows it.

Length1 <= length <= 4096
page?integer

Page number, from 1.

Range1 <= value
Default1
per_page?integer

Items per page, 1 to 1000; a value outside that range is clamped.

Default100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/domains/example.com/records"
{  "data": [    {      "id": "372e67954025e0ba6aaa6d586b9e0b59",      "domain": "example.com",      "name": "www.example.com",      "type": "A",      "content": "192.0.2.10",      "priority": 0,      "ttl": "auto",      "proxied": true,      "comment": null,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "page": 0,  "per_page": 0,  "total_count": 0,  "total_pages": 0}
POST/domains/{domain}/records

Returns 201 with the new record. You can create A, AAAA, CNAME, TXT, MX and NS records; other types, such as SRV and CAA, can be listed and deleted.

TXT: send the text exactly as the service that asked for it gave it to you, such as a certificate authority, without quotes. A value with and without quotes is the same record, so the second create is 409 record_exists.

Proxied records send their name’s traffic through DNA, which checks each request before it reaches your server. Only A, AAAA and CNAME records can be proxied, and not on a name with a label starting _, such as _dmarc, or a name your MX records point to. A proxied record’s TTL is always auto.

AuthorizationBearer <token>

An API key (d3_k_…) from the dashboard’s API keys page.

In: header

Path Parameters

domain*string

The domain’s name, such as example.com.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/domains/example.com/records" \  -H "Content-Type: application/json" \  -d '{    "type": "A",    "name": "www",    "content": "192.0.2.10",    "proxied": true  }'
{  "id": "372e67954025e0ba6aaa6d586b9e0b59",  "domain": "example.com",  "name": "www.example.com",  "type": "A",  "content": "192.0.2.10",  "priority": 0,  "ttl": "auto",  "proxied": true,  "comment": null,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET/domains/{domain}/records/{record_id}
AuthorizationBearer <token>

An API key (d3_k_…) from the dashboard’s API keys page.

In: header

Path Parameters

domain*string

The domain’s name, such as example.com.

record_id*string
Match^[0-9a-f]{32}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/domains/example.com/records/372e67954025e0ba6aaa6d586b9e0b59"
{  "id": "372e67954025e0ba6aaa6d586b9e0b59",  "domain": "example.com",  "name": "www.example.com",  "type": "A",  "content": "192.0.2.10",  "priority": 0,  "ttl": "auto",  "proxied": true,  "comment": null,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH/domains/{domain}/records/{record_id}

Send only the fields to change. The response is the record as saved. A record’s type can’t change: delete it and create a new one.

AuthorizationBearer <token>

An API key (d3_k_…) from the dashboard’s API keys page.

In: header

Path Parameters

domain*string

The domain’s name, such as example.com.

record_id*string
Match^[0-9a-f]{32}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/domains/example.com/records/372e67954025e0ba6aaa6d586b9e0b59" \  -H "Content-Type: application/json" \  -d '{    "content": "192.0.2.20"  }'
{  "id": "372e67954025e0ba6aaa6d586b9e0b59",  "domain": "example.com",  "name": "www.example.com",  "type": "A",  "content": "192.0.2.10",  "priority": 0,  "ttl": "auto",  "proxied": true,  "comment": null,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/domains/{domain}/records/{record_id}

Returns { "id": "…", "deleted": true }.

AuthorizationBearer <token>

An API key (d3_k_…) from the dashboard’s API keys page.

In: header

Path Parameters

domain*string

The domain’s name, such as example.com.

record_id*string
Match^[0-9a-f]{32}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/domains/example.com/records/372e67954025e0ba6aaa6d586b9e0b59"
{  "id": "string",  "deleted": true}