Create a New Domain Record
To create a new record to a domain, send a POST request to /v2/domains/$DOMAIN_NAME/records.
The request must include all of the required fields for the domain record type being added.
See the attribute table for details regarding record types and their respective required attributes.
Path parameters
The name of the domain itself.
Request body
Example request
{
"id": 28448429,
"type": "NS",
"name": "@",
"data": "ns1.digitalocean.com",
"ttl": 1800
}Response
The response body will be a JSON object with a key called domain_record. The value of this will be an object representing the new record. Attributes that are not applicable for the record type will be set to null. An id attribute is generated for each record as part of the object.
Example response
{
"domain_record": {
"id": 28448433,
"type": "A",
"name": "www",
"data": "162.10.66.0",
"priority": null,
"port": null,
"ttl": 1800,
"weight": null,
"flags": null,
"tag": null
}
}Changes
Changed in 4 of the 8 revisions of this API.14
- ○
api tag
DigitalOcean-public.v2-new_Domain Recordsaddedapi-tag-added
- ○
api tag
Domain Recordsremovedapi-tag-removed
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 436 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○