Documentation menu

Attach purchased domain

POSThttps://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach

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

Point one hostname of a bought domain at a compute service of this project. Gated — deploy.

Parameters

NameInTypeRequiredDescription
projectIdpathstringyes
domainNamepathstringyes

Request body

application/json

FieldTypeRequiredDescription
hostnamestringnothe domain itself or any subdomain of it (default: the domain and its www)
branchstringnobranch name (default branch if omitted)
groupstringnocompute service (default: the branch's sole compute service)

Responses

200

Default Response

FieldTypeRequiredDescription
domainNamestringyes
status"registered" | "attaching" | "active" | "attach_failed" | "detached"yesdetached: every service its hostnames named is gone — attach it again
hostnamesobject[]yes
hostnames.hostnamestringyes
hostnames.state"pending" | "attached" | "active" | "failed"yes
hostnames.reasonstringno
hostnames.servicestring | nullyesthe compute service this hostname serves; each hostname of a domain can serve a different one
registeredAtstring | nullyes
expiresAtstring | nullyes
autorenewbooleanyes
privacybooleanyes
lockedbooleanyesthe registrar transfer lock: while it is on, no other registrar can pull the domain away. Turn it off to move the domain out. What the last write reported, or what registration asked for — nothing reads it back
nameserversstring[]yeswhat the registrar holds. Empty means never written — only a nameserver write fills it in
delegatedbooleanyesthe zone is answered by nameservers InstaCloud cannot write to (custody `foreign`), so nothing published resolves and an attach is refused. A MANAGED delegation reads false: the platform still publishes there
custody"registrar" | "managed" | "foreign"yeswho answers the domain's zone: the registrar's own nameservers, a managed InstaCloud zone (delegated, still platform-published), or somewhere the platform cannot write
transferLockExpiresAtstring | nullyesICANN 60-day lock after registration: no transfer out before this, whatever `locked` says
orderIdstring | nullyes

202

Default Response

FieldTypeRequiredDescription
status"approval_required"no
approvalIdstringno
actionstringnothe gated action, or a comma-joined compound set — prefer `actions`
actionsstring[]noevery capability this approval covers
messagestringno
urlstringnothe console page where a project admin reviews this request
nextActionsobject[]no
nextActions.opstringyesNeutral logical action id, e.g. "service.add" — NOT an operationId or a CLI/MCP tool name; each client maps it to its own surface.
nextActions.reasonstringyesNatural-language, human/LLM-facing "why do this now".
nextActions.argsobjectnoSuggested, flat named arguments; "<placeholder>"s where a value is unknown.
nextActions.gatedbooleannoTrue if the action passes a governance gate.

403

Default Response

FieldTypeRequiredDescription
errorstringyes

404

Default Response

FieldTypeRequiredDescription
errorstringyes

409

the hostnames already serve this service, a previous move or sweep has not landed, or the domain is delegated to nameservers outside the registrar

FieldTypeRequiredDescription
errorstringyes

503

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown