Create a DNS record
POST
/api/organizations/{organizationId}/domains/{domainId}/dns-records
Create a new DNS record in the given managed domain. The record is created at the DNS provider and returned.
The type field determines which additional fields are permitted; sending a field that is not allowed for the chosen type is rejected:
A,AAAA,CNAME- allowmonitorType,weight.CAA- allowflags,tag.MX,HTTPS,SVCB- allowpriority.SRV- allowpriority,weight,port.- Other types (
TXT,NS,PTR,Redirect,Flatten,PullZone,Script) accept onlyname,value,ttlandcomment.
name and value are required. ttl, when supplied, must be between 15 and 86400 (defaults to 3600). priority, weight and port accept 0-65535, and flags accepts 0-255.
Authorizations
ApiToken
Long-lived API token created via POST /api/api-tokens (returned once in plaintext).
Type
API Key (header: X-API-TOKEN)
or
JWT
JWT access token obtained via POST /api/auth/login. Send as: Authorization: Bearer
Type
HTTP (bearer)
Parameters
Path Parameters
organizationId*
Organization identifier
Type
Requiredstring
domainId*
dns-record identifier
Type
Requiredstring
Request Body
JSON "type": 0, "ttl": 3600, "value": "192.0.2.1", "name": "www", "weight": 0, "priority": 10, "port": 0, "flags": 0, "tag": "issue", "monitorType": 0, "comment": "Primary web server"
{
}
Responses
dns-record resource created
JSON "@context": "string", "@id": "string", "@type": "string", "recordId": 123456, "domainId": "0f8fad5b-d9cb-469f-a165-70867728950e", "type": 0, "ttl": 3600, "value": "192.0.2.1", "name": "www", "weight": 0, "priority": 10, "port": 0, "flags": 0, "tag": "issue", "monitorStatus": 0, "monitorType": 0, "comment": "Primary web server", "id": "0f8fad5b-d9cb-469f-a165-70867728950e:123456", "typeString": "A"
{
}
