Attach a custom domain
Attach a hostname to this Space. Spacefast checks the hostname and provisions SSL. Pass redirect to answer the hostname with a whole-host redirect instead of serving the Space. If the hostname is attached to another Space, the response is a Spacefast TXT ownership challenge; verifying it moves the attachment after provider cleanup.
/v1/spaces/{spaceId}/domainsAuthorizationBearer token · headerrequiredSpace key (sfc_…) for an unclaimed anonymous Space. Also the fragment of its claim URL and the token of its /__/<key> door. A publish without a credential returns it in claim with the claim link. With the key, getSpace extends the Space's expiry window, getSpaceVersion follows its publish, createSpaceOpenLink returns its reusable open link, and restoreSpace undoes a deleteSpace while the claim window remains open.
AuthorizationBearer token · headerrequiredBetter Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.
AuthorizationOAuth2 access token · headerrequiredOAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.
domains:writespaceIdstringrequiredapplication/jsonnamestringrequiredHostname to attach. An apex or www hostname also connects its counterpart.
primarybooleanWhether this domain becomes the space's primary hostname.
redirectobject | nullAnswer this hostname with a whole-host redirect instead of serving the Space. Omit it, or pass null, to serve the Space.
Show propertiesHide properties
toobjectrequiredRedirect destination: an absolute URL, or a space (optionally with a path).
Show propertiesHide properties
urlstring<uri>requiredAbsolute URL to redirect to.
spaceIdstringrequiredSpace to redirect to (spc_...).
pathstringPath on the target space.
statusnumberHTTP redirect status. Defaults to 308.
Show propertiesHide properties
numbernumbernumbernumbernullResponse for status 201
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
dataobjectrequiredShow propertiesHide properties
tenantIdstringTenant that owns this record (ten_...).
principalobjectTenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations.
Show propertiesHide properties
tenantIdstringrequiredprincipalTypestringrequiredteamexternalprincipalIdstringrequiredwildcardEnabledbooleanWhether wildcard hostnames can be derived from this record.
redirectobjectWhole-host redirect target; present only on redirecting domains.
Show propertiesHide properties
toobjectrequiredRedirect destination: an absolute URL, or a space (optionally with a path).
Show propertiesHide properties
urlstring<uri>requiredAbsolute URL to redirect to.
spaceIdstringrequiredSpace to redirect to (spc_...).
pathstringPath on the target space.
statusstringrequired301302307308registrarobjectRegistration facet; present only on apex records.
Show propertiesHide properties
modestringrequiredWhether Spacefast manages this registration or an external registrar holds it.
spacefastexternalproviderstringRegistrar provider key for a Spacefast-managed registration, for example wpcom.
statusstringRegistration lifecycle status; expiring is derived from the expiry date.
activepending_purchasepending_transfer_inexpiringexpiredlockedexpiresAtstring<date-time>Instant when the registration expires.
redemptionEndsAtstring<date-time>Instant when the provider grace or redemption window ends after expiry.
autoRenewbooleanWhether the registration renews automatically.
transferLockbooleanWhether outbound transfers are locked at the registrar.
dnsobjectDNS hosting facet; present only on zone-cut-owning records.
Show propertiesHide properties
modestringrequiredWhether Spacefast hosts the authoritative zone or an external DNS provider does.
spacefastexternalmanagementKindstringDerived DNS management state. This field is additive. mode remains the v1 compatibility field.
unmanaged_externalconnected_providerspacefast_nameserversdnsModestringHybrid DNS mode derived from managementKind: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.
authoritativeadapterproviderstringDNS provider key for a Spacefast-hosted zone, for example spacefast or wpcom.
assignedNameserversstring[]Nameservers the registrar should use when Spacefast hosts the zone.
observedNameserversstring[]Nameservers currently observed in public DNS; polled in both modes.
ownershipProofobject | nullThe TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; null when no proof is needed.
Show propertiesHide properties
typestringrequiredAAAAACNAMETXTALIASnamestringrequiredRecord name to create, relative to the zone.
valuestringrequiredExact record value to set.
ttlintegerpurposestringrequiredWhy this record is needed.
verificationroutingsslnullownershipVerificationobject | nullThe ownership proof that Spacefast DNS waits for. Present for Spacefast-hosted DNS. null when no proof is necessary.
Show propertiesHide properties
methodstringrequiredHow the domain proves ownership. nameservers: set assignedNameservers at the registrar. The change is the proof, and Spacefast serves the zone during the wait. txt: add ownershipProof at the current DNS provider first, then change the nameservers.
txtnameserversreasonstring | nullrequiredWhy the method is txt. conflict: another person also claims this domain. already_delegated: the domain already uses Spacefast nameservers, so a change cannot prove ownership. Point it back at the previous DNS provider and add the TXT record there. not_delegated: the registry has no nameservers for the domain. null for nameservers.
Show propertiesHide properties
stringnullexpiresAtstring<date-time> | nullrequiredWhen the claim expires. If Spacefast does not see the proof by then, DNS hosting turns off and the records stay saved.
Show propertiesHide properties
string<date-time>nullnullsnapshotobjectConnected-provider record snapshot freshness for portfolio lists.
Show propertiesHide properties
freshnessstringrequiredfreshstalerefresh_runningrefresh_failednever_fetchedlastFetchedAtstring<date-time> | nullrequiredShow propertiesHide properties
string<date-time>nullversionstring | nullrequiredlastOperationobjectLatest DNS operation summary for portfolio and recovery surfaces.
Show propertiesHide properties
idstringrequiredkindstringrequiredstatusstringrequiredqueuedrunningobservingsucceededfailedcanceledupdatedAtstring<date-time>requiredhintsobject[]Projected domain hints derived from diagnostics, actions, observations, and operations.
Show propertiesHide properties
objectidstringrequiredcodestringrequiredseveritystringrequiredinfowarningerrorpainLevelstringrequiredinfoneeds_attentionblockedbrokendangeroussubjectFacetstringrequireddns_zoneregistrarhosting_bindingemailforwardingprovider_connectionsubjectRefobjectrequiredShow propertiesHide properties
domainIdstringrequiredzoneIdstringbindingIdstringconnectionIdstringownerstringrequiredspacefastuserregistrarprovidersupportwaitingstatusstringrequiredactivewaitingrunningresolveddismissedsummarystringrequireddescriptionstringrequiredimpactstringrequiredevidenceobject[]requiredShow propertiesHide properties
objectlabelstringrequiredvaluestringrequiredobservedAtstring<date-time>sourcestringrequiredprovider_apipublic_dnsregistrarspacefast_dboperationuser_inputsuggestionsobject[]requiredShow propertiesHide properties
objectlabelstringrequireddescriptionstringrequiredactionobjectrequiredShow propertiesHide properties
typestringrequiredactionIdstringrequiredtypestringrequiredactionKindstringrequiredtypestringrequiredrecordsobject[]requiredShow propertiesHide properties
objecttypestringrequiredAAAAACNAMETXTALIASnamestringrequiredRecord name to create, relative to the zone.
valuestringrequiredExact record value to set.
ttlintegerpurposestringrequiredWhy this record is needed.
verificationroutingssltypestringrequiredtargetstringrequiredtypestringrequiredconnectionIdstringrequiredtypestringrequiredurlstring<uri>requiredtypestringrequiredretryAfterstring<date-time>requiredprimarybooleandestructivebooleandocsUrlstring<uri>operationIdstringrequestIdstringproviderRequestIdstringexpiresAtstring<date-time>idstringrequiredDomain attachment ID.
spaceIdstringrequiredSpace that serves this hostname.
namestringrequiredCanonical lowercase ASCII hostname without a trailing dot.
unicodeNamestringUnicode hostname, when different from name.
kindstringrequiredhostnameapexderivedGroupstringrequiredRegistrable domain for this hostname.
primarybooleanrequiredWhether this hostname is the Space's primary URL.
verificationobjectrequiredProvider status and required DNS records.
Show propertiesHide properties
statusstringrequiredCurrent proof of DNS control. failed alone never tears down compiled serving state.
not_requiredpendingverifiedfailedrequiredRecordsobject[]DNS records the caller must create to prove control and route traffic.
Show propertiesHide properties
objecttypestringrequiredAAAAACNAMETXTALIASnamestringrequiredRecord name to create, relative to the zone.
valuestringrequiredExact record value to set.
ttlintegerpurposestringrequiredWhy this record is needed.
verificationroutingssllastCheckedAtstring<date-time> | nullInstant when observed DNS was last polled.
Show propertiesHide properties
string<date-time>nulllastVerifiedAtstring<date-time> | nullInstant when this domain last proved DNS control.
Show propertiesHide properties
string<date-time>nulldiagnosticsobject[]Structured verification diagnostics with stable codes.
Show propertiesHide properties
objectcodestringrequiredStable snake_case diagnostic code naming the public contract that produced it.
severitystringrequiredHow actionable the diagnostic is.
infowarningerrormessagestringrequiredHuman-readable explanation with enough detail to act on.
pathstring | nullArtifact path the diagnostic points at, for example "_headers:12", when one exists.
providerstring | nullUpstream system the diagnostic originated from, when not Spacefast itself.
Show propertiesHide properties
stringnulldetailsobject | nullMachine-readable context for the diagnostic code.
Show propertiesHide properties
objectnullfixstring | nullConcrete, agent-actionable remediation hint, when one can be derived.
retryableboolean | nullWhether retrying the same operation can resolve this diagnostic without the caller changing anything.
servingRecordsobjectPresent when Spacefast DNS holds this domain's zone. Then verification.requiredRecords is empty, because the team adds no records by hand.
Show propertiesHide properties
sourcestringrequiredSpacefast DNS holds this domain's zone.
zoneobjectrequiredShow propertiesHide properties
hostnamestringrequiredZone that holds this domain's records.
statusstringrequiredserved: Spacefast DNS answers for the zone. awaiting_proof: Spacefast DNS answers after the team proves it controls the zone. not_published: Spacefast stores the zone's records but does not answer for the zone yet.
servedawaiting_proofnot_publishednamesobject[]requiredOne entry for each hostname that this domain serves.
Show propertiesHide properties
objectnamestringrequiredHostname that this domain serves.
statestringrequiredserved: Spacefast's records answer at this name. satisfied: the team's own records already point at the Space. blocked: the team's records point somewhere else, so Spacefast writes nothing here. pending: the next domain check writes Spacefast's records here. unknown: Spacefast does not know the Space's addresses yet, so it changes nothing here.
servedsatisfiedblockedpendingunknownrecordsobject[]requiredRecords that Spacefast keeps at this name. Empty while the name is blocked.
Show propertiesHide properties
objecttypestringrequiredAAAAACNAMETXTALIASnamestringrequiredRecord name to create, relative to the zone.
valuestringrequiredExact record value to set.
ttlintegerpurposestringrequiredWhy this record is needed.
verificationroutingsslblockingobject[]requiredThe team's records that block this name. Replace deletes A, AAAA, CNAME and ALIAS records. It never deletes an NS delegation: the team removes that record itself.
Show propertiesHide properties
objectidstringrequiredDNS record id (rec_...).
typestringrequiredDNS record type.
AAAAAALIASCAACNAMEMXNSSRVTXTnamestringrequiredRecord name relative to the zone. "@" is the zone apex.
valuestringrequiredRecord value.
ownershipobjectPresent while this Space claims a hostname attached elsewhere.
Show propertiesHide properties
statusstringrequiredverification_requiredmovingexpiresAtstring<date-time>requiredmoveAvailablebooleanrequiredsourcestringrequiredCustom hostname attached to this Space.
managedbooleanrequireddeletablebooleanrequiredassignablebooleanrequiredcreatedAtstring<date-time>requiredupdatedAtstring<date-time>requiredoperationobject | nullrequiredBackground operation handle when asynchronous work remains after this mutation; null when it completed synchronously.
Show propertiesHide properties
idstringrequiredkindstringrequiredstatusstringrequiredqueuedrunningsucceededfailedcanceledresourcesobject[]requiredShow propertiesHide properties
objecttypestringrequiredidstringrequiredprogressobjectShow propertiesHide properties
totalintegerrequiredcompletedintegerrequiredfailedintegerrequireddiagnosticsobject[]Show propertiesHide properties
objectcodestringrequiredStable snake_case diagnostic code naming the public contract that produced it.
severitystringrequiredHow actionable the diagnostic is.
infowarningerrormessagestringrequiredHuman-readable explanation with enough detail to act on.
pathstring | nullArtifact path the diagnostic points at, for example "_headers:12", when one exists.
providerstring | nullUpstream system the diagnostic originated from, when not Spacefast itself.
Show propertiesHide properties
stringnulldetailsobject | nullMachine-readable context for the diagnostic code.
Show propertiesHide properties
objectnullfixstring | nullConcrete, agent-actionable remediation hint, when one can be derived.
retryableboolean | nullWhether retrying the same operation can resolve this diagnostic without the caller changing anything.
createdAtstring<date-time>requiredfinishedAtstring<date-time>nullProblem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
typestringrequiredProblem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.
titlestringrequiredShort human-readable summary of the problem type. The server derives it mechanically from code.
statusintegerrequiredHTTP status code of this response, repeated in the body.
detailstringrequiredHuman-readable failure explanation for this occurrence.
codestringrequiredStable snake_case error code naming the failed public contract.
pointerstringRFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.
detailsobjectMachine-readable context for the error code.
fixstringOne sentence on what to do about this error code, the same text as the type page. Read it before retrying.
suggestionsstring[]Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.
nextstring[]Copy-pasteable commands or API requests an agent can run next.
requestIdstringrequiredThe request id to quote when contacting support.