Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Remove a custom domain

Remove the attachment. Returns the operation that removes provider aliases and releases the hostname.

DELETE/v1/spaces/{spaceId}/domains/{domainId}
Authorization
AuthorizationBearer token · headerrequired

Space 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.

or
AuthorizationBearer token · headerrequired

Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.

or
AuthorizationOAuth2 access token · headerrequired

OAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.

Scopes:domains:write
Path parameters
spaceIdstringrequired
domainIdstringrequired
Responses
200

Response for status 200

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

dataobjectrequired
Show properties
wildcardEnabledboolean

Whether wildcard hostnames can be derived from this record.

redirectobject

Whole-host redirect target; present only on redirecting domains.

Show properties
toobjectrequired

Redirect destination: an absolute URL, or a space (optionally with a path).

Show properties
Any of:
object
urlstring<uri>required

Absolute URL to redirect to.

object
spaceIdstringrequired

Space to redirect to (spc_...).

min length 1
pathstring

Path on the target space.

max length 255
statusstringrequired
Allowed:301302307308
registrarobject

Registration facet; present only on apex records.

Show properties
providerstring

Registrar provider key for a Spacefast-managed registration, for example wpcom.

statusstring

Registration lifecycle status; expiring is derived from the expiry date.

Allowed:activepending_purchasepending_transfer_inexpiringexpiredlocked
expiresAtstring<date-time>

Instant when the registration expires.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
redemptionEndsAtstring<date-time>

Instant when the provider grace or redemption window ends after expiry.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
autoRenewboolean

Whether the registration renews automatically.

transferLockboolean

Whether outbound transfers are locked at the registrar.

dnsobject

DNS hosting facet; present only on zone-cut-owning records.

Show properties
managementKindstring

Derived DNS management state. This field is additive. mode remains the v1 compatibility field.

Allowed:unmanaged_externalconnected_providerspacefast_nameservers
dnsModestring

Hybrid 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.

Allowed:authoritativeadapter
providerstring

DNS 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 | null

The 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 properties
Any of:
object
typestringrequired
Allowed:AAAAACNAMETXTALIAS
namestringrequired

Record name to create, relative to the zone.

valuestringrequired

Exact record value to set.

ttlinteger
min -9007199254740991 · max 9007199254740991
purposestringrequired

Why this record is needed.

Allowed:verificationroutingssl
null
null
ownershipVerificationobject | null

The ownership proof that Spacefast DNS waits for. Present for Spacefast-hosted DNS. null when no proof is necessary.

Show properties
Any of:
object
methodstringrequired

How 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.

Allowed:txtnameservers
reasonstring | nullrequired

Why 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 properties
Any of:
string
string
null
null
expiresAtstring<date-time> | nullrequired

When the claim expires. If Spacefast does not see the proof by then, DNS hosting turns off and the records stay saved.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
null
null
snapshotobject

Connected-provider record snapshot freshness for portfolio lists.

Show properties
freshnessstringrequired
Allowed:freshstalerefresh_runningrefresh_failednever_fetched
lastFetchedAtstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
versionstring | nullrequired
lastOperationobject

Latest DNS operation summary for portfolio and recovery surfaces.

Show properties
idstringrequired
kindstringrequired
statusstringrequired
Allowed:queuedrunningobservingsucceededfailedcanceled
updatedAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
hintsobject[]

Projected domain hints derived from diagnostics, actions, observations, and operations.

Show properties
Array of object
idstringrequired
codestringrequired
severitystringrequired
Allowed:infowarningerror
painLevelstringrequired
Allowed:infoneeds_attentionblockedbrokendangerous
subjectFacetstringrequired
Allowed:dns_zoneregistrarhosting_bindingemailforwardingprovider_connection
subjectRefobjectrequired
Show properties
domainIdstringrequired
zoneIdstring
bindingIdstring
connectionIdstring
ownerstringrequired
Allowed:spacefastuserregistrarprovidersupportwaiting
statusstringrequired
Allowed:activewaitingrunningresolveddismissed
summarystringrequired
descriptionstringrequired
impactstringrequired
evidenceobject[]required
Show properties
Array of object
labelstringrequired
valuestringrequired
observedAtstring<date-time>
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
sourcestringrequired
Allowed:provider_apipublic_dnsregistrarspacefast_dboperationuser_input
suggestionsobject[]required
Show properties
Array of object
labelstringrequired
descriptionstringrequired
actionobjectrequired
Show properties
One of:
object
typestringrequired
actionIdstringrequired
object
typestringrequired
actionKindstringrequired
object
typestringrequired
recordsobject[]required
Show properties
Array of object
typestringrequired
Allowed:AAAAACNAMETXTALIAS
namestringrequired

Record name to create, relative to the zone.

valuestringrequired

Exact record value to set.

ttlinteger
min -9007199254740991 · max 9007199254740991
purposestringrequired

Why this record is needed.

Allowed:verificationroutingssl
object
typestringrequired
targetstringrequired
object
typestringrequired
connectionIdstringrequired
object
typestringrequired
urlstring<uri>required
object
typestringrequired
retryAfterstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
primaryboolean
destructiveboolean
docsUrlstring<uri>
operationIdstring
requestIdstring
providerRequestIdstring
expiresAtstring<date-time>
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
idstringrequired

Domain attachment ID.

spaceIdstringrequired

Space that serves this hostname.

namestringrequired

Canonical lowercase ASCII hostname without a trailing dot.

unicodeNamestring

Unicode hostname, when different from name.

kindstringrequired
Allowed:hostnameapex
derivedGroupstringrequired

Registrable domain for this hostname.

primarybooleanrequired

Whether this hostname is the Space's primary URL.

verificationobjectrequired

Provider status and required DNS records.

Show properties
statusstringrequired

Current proof of DNS control. failed alone never tears down compiled serving state.

Allowed:not_requiredpendingverifiedfailed
requiredRecordsobject[]

DNS records the caller must create to prove control and route traffic.

Show properties
Array of object
typestringrequired
Allowed:AAAAACNAMETXTALIAS
namestringrequired

Record name to create, relative to the zone.

valuestringrequired

Exact record value to set.

ttlinteger
min -9007199254740991 · max 9007199254740991
purposestringrequired

Why this record is needed.

Allowed:verificationroutingssl
lastCheckedAtstring<date-time> | null

Instant when observed DNS was last polled.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
lastVerifiedAtstring<date-time> | null

Instant when this domain last proved DNS control.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
diagnosticsobject[]

Structured verification diagnostics with stable codes.

Show properties
Array of object
codestringrequired

Stable snake_case diagnostic code naming the public contract that produced it.

severitystringrequired

How actionable the diagnostic is.

Allowed:infowarningerror
messagestringrequired

Human-readable explanation with enough detail to act on.

pathstring | null

Artifact path the diagnostic points at, for example "_headers:12", when one exists.

providerstring | null

Upstream system the diagnostic originated from, when not Spacefast itself.

Show properties
Any of:
string
string
null
null
detailsobject | null

Machine-readable context for the diagnostic code.

Show properties
Any of:
object
object
null
null
fixstring | null

Concrete, agent-actionable remediation hint, when one can be derived.

retryableboolean | null

Whether retrying the same operation can resolve this diagnostic without the caller changing anything.

servingRecordsobject

Present when Spacefast DNS holds this domain's zone. Then verification.requiredRecords is empty, because the team adds no records by hand.

Show properties
sourcestringrequired

Spacefast DNS holds this domain's zone.

zoneobjectrequired
Show properties
hostnamestringrequired

Zone that holds this domain's records.

statusstringrequired

served: 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.

Allowed:servedawaiting_proofnot_published
namesobject[]required

One entry for each hostname that this domain serves.

Show properties
Array of object
namestringrequired

Hostname that this domain serves.

statestringrequired

served: 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.

Allowed:servedsatisfiedblockedpendingunknown
recordsobject[]required

Records that Spacefast keeps at this name. Empty while the name is blocked.

Show properties
Array of object
typestringrequired
Allowed:AAAAACNAMETXTALIAS
namestringrequired

Record name to create, relative to the zone.

valuestringrequired

Exact record value to set.

ttlinteger
min -9007199254740991 · max 9007199254740991
purposestringrequired

Why this record is needed.

Allowed:verificationroutingssl
blockingobject[]required

The 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 properties
Array of object
idstringrequired

DNS record id (rec_...).

typestringrequired

DNS record type.

Allowed:AAAAAALIASCAACNAMEMXNSSRVTXT
namestringrequired

Record name relative to the zone. "@" is the zone apex.

valuestringrequired

Record value.

ownershipobject

Present while this Space claims a hostname attached elsewhere.

Show properties
statusstringrequired
Allowed:verification_requiredmoving
expiresAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
moveAvailablebooleanrequired
sourcestringrequired

Custom hostname attached to this Space.

managedbooleanrequired
deletablebooleanrequired
assignablebooleanrequired
createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
updatedAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
operationobject | nullrequired

Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously.

Show properties
Any of:
object
idstringrequired
kindstringrequired
statusstringrequired
Allowed:queuedrunningsucceededfailedcanceled
resourcesobject[]required
Show properties
Array of object
typestringrequired
idstringrequired
progressobject
Show properties
totalintegerrequired
min 0 · max 9007199254740991
completedintegerrequired
min 0 · max 9007199254740991
failedintegerrequired
min 0 · max 9007199254740991
diagnosticsobject[]
Show properties
Array of object
codestringrequired

Stable snake_case diagnostic code naming the public contract that produced it.

severitystringrequired

How actionable the diagnostic is.

Allowed:infowarningerror
messagestringrequired

Human-readable explanation with enough detail to act on.

pathstring | null

Artifact path the diagnostic points at, for example "_headers:12", when one exists.

providerstring | null

Upstream system the diagnostic originated from, when not Spacefast itself.

Show properties
Any of:
string
string
null
null
detailsobject | null

Machine-readable context for the diagnostic code.

Show properties
Any of:
object
object
null
null
fixstring | null

Concrete, agent-actionable remediation hint, when one can be derived.

retryableboolean | null

Whether retrying the same operation can resolve this diagnostic without the caller changing anything.

createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
finishedAtstring<date-time>
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
null
null
default

Problem 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.

typestringrequired

Problem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.

titlestringrequired

Short human-readable summary of the problem type. The server derives it mechanically from code.

statusintegerrequired

HTTP status code of this response, repeated in the body.

min -9007199254740991 · max 9007199254740991
detailstringrequired

Human-readable failure explanation for this occurrence.

codestringrequired

Stable snake_case error code naming the failed public contract.

pointerstring

RFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.

detailsobject

Machine-readable context for the error code.

fixstring

One 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.

requestIdstringrequired

The request id to quote when contacting support.

Try it
Server
Authorization
Parameters
Request
curl -X DELETE 'https://api.spacefast.com/v1/spaces/string/domains/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "$schema": "http://example.com",
  "data": {
    "wildcardEnabled": true,
    "redirect": {
      "to": {
        "url": "http://example.com"
      },
      "status": 301
    },
    "registrar": {
      "provider": "string",
      "status": "active",
      "expiresAt": "2019-08-24T14:15:22Z",
      "redemptionEndsAt": "2019-08-24T14:15:22Z",
      "autoRenew": true,
      "transferLock": true
    },
    "dns": {
      "managementKind": "unmanaged_external",
      "dnsMode": "authoritative",
      "provider": "string",
      "assignedNameservers": [
        "string"
      ],
      "observedNameservers": [
        "string"
      ],
      "ownershipProof": {
        "type": "A",
        "name": "string",
        "value": "string",
        "ttl": -9007199254740991,
        "purpose": "verification"
      },
      "ownershipVerification": {
        "method": "txt",
        "reason": "conflict",
        "expiresAt": "2019-08-24T14:15:22Z"
      },
      "snapshot": {
        "freshness": "fresh",
        "lastFetchedAt": "2019-08-24T14:15:22Z",
        "version": "string"
      },
      "lastOperation": {
        "id": "string",
        "kind": "string",
        "status": "queued",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    },
    "hints": [
      {
        "id": "string",
        "code": "string",
        "severity": "info",
        "painLevel": "info",
        "subjectFacet": "dns_zone",
        "subjectRef": {
          "domainId": "string",
          "zoneId": "string",
          "bindingId": "string",
          "connectionId": "string"
        },
        "owner": "spacefast",
        "status": "active",
        "summary": "string",
        "description": "string",
        "impact": "string",
        "evidence": [
          {
            "label": "string",
            "value": "string",
            "observedAt": "2019-08-24T14:15:22Z",
            "source": "provider_api"
          }
        ],
        "suggestions": [
          {
            "label": "string",
            "description": "string",
            "action": {
              "type": "open_pending_action",
              "actionId": "string"
            },
            "primary": true,
            "destructive": true
          }
        ],
        "docsUrl": "http://example.com",
        "operationId": "string",
        "requestId": "string",
        "providerRequestId": "string",
        "expiresAt": "2019-08-24T14:15:22Z"
      }
    ],
    "id": "string",
    "spaceId": "string",
    "name": "string",
    "unicodeName": "string",
    "kind": "hostname",
    "derivedGroup": "string",
    "primary": true,
    "verification": {
      "status": "not_required",
      "requiredRecords": [
        {
          "type": "A",
          "name": "string",
          "value": "string",
          "ttl": -9007199254740991,
          "purpose": "verification"
        }
      ],
      "lastCheckedAt": "2019-08-24T14:15:22Z",
      "lastVerifiedAt": "2019-08-24T14:15:22Z",
      "diagnostics": [
        {
          "code": "string",
          "severity": "info",
          "message": "string",
          "path": "string",
          "provider": "infra",
          "details": {
            "property1": null,
            "property2": null
          },
          "fix": "string",
          "retryable": true
        }
      ]
    },
    "servingRecords": {
      "source": "spacefast_dns",
      "zone": {
        "hostname": "string",
        "status": "served"
      },
      "names": [
        {
          "name": "string",
          "state": "served",
          "records": [
            {
              "type": "A",
              "name": "string",
              "value": "string",
              "ttl": -9007199254740991,
              "purpose": "verification"
            }
          ],
          "blocking": [
            {
              "id": "string",
              "type": "A",
              "name": "string",
              "value": "string"
            }
          ]
        }
      ]
    },
    "ownership": {
      "status": "verification_required",
      "expiresAt": "2019-08-24T14:15:22Z",
      "moveAvailable": true
    },
    "source": "custom",
    "managed": false,
    "deletable": true,
    "assignable": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "operation": {
    "id": "string",
    "kind": "string",
    "status": "queued",
    "resources": [
      {
        "type": "string",
        "id": "string"
      }
    ],
    "progress": {
      "total": 0,
      "completed": 0,
      "failed": 0
    },
    "diagnostics": [
      {
        "code": "string",
        "severity": "info",
        "message": "string",
        "path": "string",
        "provider": "infra",
        "details": {
          "property1": null,
          "property2": null
        },
        "fix": "string",
        "retryable": true
      }
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "finishedAt": "2019-08-24T14:15:22Z"
  }
}

Was this page helpful?