Documentation menu

Create domain record

POSThttps://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records

Token scope: account · org — read-only tokens refused (not a GET).

Add a DNS record to a bought domain's zone. Omitted, host is the domain itself and ttl is 300 seconds. Routing (A, AAAA, ANAME, CNAME) and delegation (NS) are refused at a hostname an attach serves — those are the platform's — and an NS above one, which would delegate it away; attaching a hostname later replaces the routing records at that host.

Parameters

NameInTypeRequiredDescription
orgIdpathstringyes
domainNamepathstringyes

Request body

application/json

FieldTypeRequiredDescription
type"A" | "AAAA" | "ANAME" | "CNAME" | "MX" | "NS" | "SRV" | "TXT"yes
hoststringnorelative to the domain: "@" for the domain itself, "api" for api.<domain>; the full hostname is accepted too
answerstringyesan IPv4 (A) or IPv6 (AAAA) address; a hostname (CNAME, ANAME, NS, MX); "<weight> <port> <target>" (SRV); text (TXT). "." is the null MX and the no-service SRV target
ttlintegernoseconds
priorityintegernorequired for MX and SRV, refused for every other type

Responses

201

Default Response

FieldTypeRequiredDescription
idintegeryesthe registrar's id for the record; the handle every write takes
type"A" | "AAAA" | "ANAME" | "CNAME" | "MX" | "NS" | "SRV" | "TXT"yes
hoststringyesrelative to the domain: "@" is the domain itself, "api" is api.<domain>
fqdnstringyes
answerstringyes
ttlintegeryesseconds
priorityintegernoMX and SRV only
managedbooleanyespublished by InstaCloud: read-only while `hostname` names the attached hostname it serves; without one, a leftover no hostname claims, which may be deleted
hostnamestringnothe attached hostname a managed record serves

400

the record does not fit its type, the zone cannot hold it (a CNAME or NS at the domain itself), or the registrar refused it — with its own sentence

FieldTypeRequiredDescription
errorstringyes

404

Default Response

FieldTypeRequiredDescription
errorstringyes

409

the host serves a compute service through InstaCloud, or an NS there would delegate one away

FieldTypeRequiredDescription
errorstringyes

502

Default Response

FieldTypeRequiredDescription
errorstringyes

503

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown