Get DNS snapshot and compare-and-replace signatures
/api/v1/domains/{id}/dnsOperates on your account only. Send your API key in the Authorization header. Responses use JSON.
Request
Set BASE_URL to this website’s HTTPS origin and API_KEY to your private key. Replace RESOURCE_ID with the ID returned by the API.
curl --request GET "${BASE_URL}/api/v1/domains/RESOURCE_ID/dns" \
--header "Authorization: Bearer $API_KEY"Headers & parameters
AuthorizationrequiredBearer YOUR_API_KEY
idpath · stringrequiredNumeric domain ID; UUID for an order, operation or request.
Response
request_idstringrequiredIdentifier used to recover an outcome after a network failure.
backendstringdelegationstringsnapshotobjectconst: true
itemsarrayrequireditems[].idintegeritems[].record_typestringDNS record type, such as A, AAAA, CNAME, TXT, MX or SRV.
items[].namestring@ for the apex, * for wildcard, or a record name.
items[].contentstringRecord value matching its type.
items[].priorityinteger | nullMX priority: lower values are preferred.
items[].ttlintegerDNS cache lifetime in seconds; 1 means automatic.
items[].proxiedbooleanProxy a compatible record through Cloudflare.
items[].commentstringRecord note; not published in DNS.
rrsetsarrayrequiredrrsets[].namestring@ for the apex, * for wildcard, or a record name.
rrsets[].record_typestringDNS record type, such as A, AAAA, CNAME, TXT, MX or SRV.
rrsets[].expectedstringCurrent RRset signature from GET DNS. Prevents overwriting concurrent changes.
empty_rrset_expectedstringrequiredResponse structure example · illustrative values
{
"request_id": "00000000-0000-4000-8000-000000000001",
"backend": "string",
"delegation": "string",
"snapshot": true,
"items": [
{
"id": 1,
"record_type": "string",
"name": "example.com",
"content": "string",
"priority": 1,
"ttl": 1,
"proxied": false,
"comment": "string"
}
],
"rrsets": [
{
"name": "example.com",
"record_type": "string",
"expected": "string"
}
],
"empty_rrset_expected": "string"
}Errors & statuses
error.code · error.message · request_id
401Invalid or revoked key.
404Resource not found in your account.
409Idempotency conflict or request in progress.
422Invalid parameters or business rule, including balance.
500Outcome may be uncertain. Poll the request.
503Temporarily unavailable. Respect Retry-After.