DigitalOcean-public.v2-new_Domains
Create a New Domain
To create a new domain, send a POST request to /v2/domains. Set the "name" attribute to the domain name you are adding. Optionally, you may set the "ip_address" attribute, and an A record will be automatically created pointing to the apex domain.
post/v2/domains
Request body
Example request
{
"name": "example.com",
"ip_address": "192.0.2.1",
"ttl": 1800,
"zone_file": "$ORIGIN example.com.\n$TTL 1800\nexample.com. IN SOA ns1.digitalocean.com. hostmaster.example.com. 1415982609 10800 3600 604800 1800\nexample.com. 1800 IN NS ns1.digitalocean.com.\nexample.com. 1800 IN NS ns2.digitalocean.com.\nexample.com. 1800 IN NS ns3.digitalocean.com.\nexample.com. 1800 IN A 1.2.3.4\n"
}Response
The response will be a JSON object with a key called domain. The value of this will be an object that contains the standard attributes associated with a domain.
Example response
{
"domain": {
"name": "example.com",
"ttl": 1800,
"zone_file": null
}
}