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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | yes | |
domainName | path | string | yes |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
type | "A" | "AAAA" | "ANAME" | "CNAME" | "MX" | "NS" | "SRV" | "TXT" | yes | |
host | string | no | relative to the domain: "@" for the domain itself, "api" for api.<domain>; the full hostname is accepted too |
answer | string | yes | an 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 |
ttl | integer | no | seconds |
priority | integer | no | required for MX and SRV, refused for every other type |
Responses
201
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | yes | the registrar's id for the record; the handle every write takes |
type | "A" | "AAAA" | "ANAME" | "CNAME" | "MX" | "NS" | "SRV" | "TXT" | yes | |
host | string | yes | relative to the domain: "@" is the domain itself, "api" is api.<domain> |
fqdn | string | yes | |
answer | string | yes | |
ttl | integer | yes | seconds |
priority | integer | no | MX and SRV only |
managed | boolean | yes | published by InstaCloud: read-only while `hostname` names the attached hostname it serves; without one, a leftover no hostname claims, which may be deleted |
hostname | string | no | the 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
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
409
the host serves a compute service through InstaCloud, or an NS there would delegate one away
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
502
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
503
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |