Docs Home Return to Homepage
Get Started Login

DNS

DNS endpoints work with a full access key, or a restricted key with a DNS scope for the domain: reads need the scope’s read permission, changes need write. The domain must be on the account (404, not_found, otherwise); a key without the permission gets 403, scope_denied. A record that isn’t valid (a bad value, a type that isn’t allowed) is refused with 422 and an error message, e.g. { "error": "Record type 'PTR' is not allowed", "code": "validation_failed" }. On accounts with High-Profile Protection every change is refused with 403 (see Domains); reads and Export Zone stay open.

A record’s id comes from its name, type and content, so it changes when the record does: an update returns the record’s new id. Records with the same name and type share one TTL. Other DNS answers:

  • 404 with DNS isn't set up for this domain. when the domain has no zone yet (adding a record sets it up).
  • 409 when the zone changed while the change was being made. Try again.
  • 423 when changes to the domain’s DNS are locked by our team.
  • 429 when changes come too fast, with a Retry-After header.
  • 503 when DNS is temporarily unavailable.

List Records

GET /dns/{domain}/records Query Parameters Field Type Required Description type string No Filter by record type (any case). 400 for anything but A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR, SOA, TLSA,...

Create Record

POST /dns/{domain}/records Parameters Field Type Required Default Description name string Yes Record name: www, mail.sub, @ for the domain itself, or a full name ending in a dot type string Yes Record...

Get Record

GET /dns/{domain}/records/{id} 404 when the record isn't on the domain. Response { "id": "3f9c2a71b04d8e65", "name": "www.example.com.", "display_name&quot...

Update Record

PUT /dns/{domain}/records/{id} Partial updates are supported: send only the fields you want to change. The response is the record as stored, with a new id when its name, type or content changed. ttl s...

Delete Record

DELETE /dns/{domain}/records/{id} 404 when the record isn't on the domain. Response { "message": "Record deleted." } Errors Besides the errors any endpoint can return: Status Code...

Dynamic DNS

POST /dns/{domain}/ddns Replaces all records matching the given name and type with a single record pointing at the IP, with a TTL of 60. Useful for dynamic IP updates; sending an address that hasn't c...

Dynamic DNS for Routers

Keep a name pointed at a home or office connection from a router, ddclient or inadyn, over DynDNS2.

Export Zone

GET /dns/{domain}/export Exports all DNS records in BIND zone file format (includes SOA and apex NS). Response { "domain": "example.com", "zone_file": "; Zone file f...

Certificates over DNS-01

Get Let's Encrypt or ZeroSSL certificates, wildcards included, with acme.sh, lego, Traefik, cert-manager, Caddy or certbot proving the name over DNS-01.

Import Records

POST /dns/{domain}/import Bulk creates DNS records in one change. A record joins any existing records with the same name and type rather than replacing them. Records that fail our checks are skipped a...

Snagged on something?

Our sysadmins answer tickets around the clock.