Domains and DNS
Add a domain
POST/api/v1/domains
Who can use this: Site adminsAs Markdown
Unless you say otherwise, mail for the domain is accepted from now on and it gets a DNS zone here. A zone that already exists is kept as it is.
Parameters
| Name | Where | What it is |
|---|---|---|
| domain_name required | body | The domain, in lowercase.e.g. example.com |
| mail_enabled | body | Accept mail for it. true if left out; false for DNS only. |
| dns_managed | body | Keep its DNS zone here, creating the zone if needed. true if left out; false for mail only. |
| nameservers | body | The name servers for a new zone, as a list. If left out, the zone's name server is ns-test. followed by the domain. |
Good to know
- A domain that is already listed answers 409.
- If the DNS zone can't be created, the answer is 502 and the domain isn't added.