Create an A record
POST
/api/v2/organizations/{organization}/dns/zones/{zoneId}/records
const url = 'https://dashboard.quantcdn.io/api/v2/organizations/example/dns/zones/example/records';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"dragon-den","type":"A","value":"203.0.113.10","ttl":300}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dashboard.quantcdn.io/api/v2/organizations/example/dns/zones/example/records \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "dragon-den", "type": "A", "value": "203.0.113.10", "ttl": 300 }'Dns:write and add_domains are required. Existing names are rejected; this endpoint does not update records. Only organization-wide tokens are accepted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organization
required
string
zoneId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Name relative to the zone; @ denotes the apex
string
Example
dragon-dentype
required
string
value
required
string format: ipv4
Example
203.0.113.10ttl
integer
Responses
Section titled “Responses”Success
Missing or invalid API token
Token scope, organization or role permission denied
Zone not found in this organization
A record already exists for this name
Invalid request
DNS service unavailable
