Read and update the DNS host records on a domain that uses the registrar’s DNS management.
DNS management depends on the registrar module backing your account. The current sandbox registrar returns a 501 “Function not supported by the registrar module” for both DNS calls. The request and response shapes below describe the intended behavior on a registrar that supports DNS management; see the observed sandbox response at the end of each section.

Get DNS records

Return the DNS host records for a domain. GET /domains/{domain}/dns

Parameters

text
required
The domain to read, for example example.com.

Request

Response

On a registrar that supports DNS management, this returns the current host records as an array of DNS record objects. On the sandbox registrar it returns:

Save DNS records

Replace the DNS host records on a domain. Send the full set you want stored; records omitted from the request are removed. POST /domains/{domain}/dns

Parameters

text
required
The domain to update, for example example.com.
array
required
The full set of host records, indexed from 0. Each record is a DNS record object with hostname, type, address, priority, and an optional recid on existing records.
Encode each record with indexed bracket notation, for example dnsrecords[0][hostname]=@.

Request

Response

On a registrar that supports DNS management, this returns a success status once the records are stored. On the sandbox registrar it returns: