Domains and DNS
Create or replace a DNS record
POST/api/v1/domains/:domain/dns/records
Who can use this: Site adminsAs Markdown
What you send replaces what that name and type held before, so to add a second value (a backup MX, say) send both. TXT values are put in quotes for you, and the host name at the end of an MX, NS, CNAME, PTR or SRV value gets its final dot. restart_pending is true when the name and type had no record before.
Parameters
| Name | Where | What it is |
|---|---|---|
| domain required | path | The domain whose zone it goes in.e.g. example.com |
| name required | body | The record's full name, such as www.example.com, or the domain itself for its own records. A final dot is optional.e.g. www.example.com |
| type required | body | The record type in capitals, such as A, AAAA, CNAME, MX or TXT.e.g. A |
| content required | body | One value, or a list of them.e.g. ["203.0.113.10"] |
| ttl | body | How long, in seconds, others may keep it. 3600 if left out.e.g. 3600 |
Good to know
- A domain that isn't listed answers 404.
- A record the DNS server refuses (a name outside the domain, say) answers 502, with its reason.