Create a DNS record for a domain

POST/v1/dns/domains/{dns_domain_id}/records

To add a new DNS record, send a POST request to the /v1/dns/domains/{dns_domain_id}/records endpoint with the domain ID in the path parameter. Fill in the record details in the request body; required fields depend on the record type. Records can be added even while the domain is in the undelegated status. SOA and PTR records can't be created through this endpoint. See DNS Domain for details.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

FieldDetails
dns_domain_id
string

A unique identifier of a DNS domain.

Request Body

FieldDetails
name
string

A name of a DNS record. Use @ to refer to the domain itself.

type
string

A record type. Must be A.

data
string

An IPv4 address the record points to.

ttl?
integer

TTL (time to live) defines how long a record will be cached on the DNS servers.

priority?
integer

Not used for A records. Leave it empty.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/dns/domains/X7axvrdy/records" \  -H "Content-Type: application/json" \  -d '{    "name": "www.example-660.com",    "type": "A",    "data": "127.0.0.1",    "ttl": 3600,    "priority": 10  }'

{  "id": "J0dN6dLO",  "type": "A",  "name": "www.example-660.com",  "domain_id": "46dBgJe7",  "data": "127.0.0.1",  "priority": 10,  "ttl": 3600,  "updated_at": "2025-12-31T00:00:00Z",  "created_at": "2025-12-31T00:00:00Z"}