---
raw: true
search:
  tags:
    - Domains
    - DELETE
seo:
  description: >-
    Remove the attachment. Returns the operation that removes… Reference for the
    DELETE /v1/spaces/{spaceId}/domains/{domainId} endpoint in the Spacefast
    API.
sidebar:
  label: Remove a custom domain
  badge: DELETE
title: Remove a custom domain
type: openapi-operation
---
Remove the attachment. Returns the operation that removes provider aliases and releases the hostname.

`DELETE /v1/spaces/{spaceId}/domains/{domainId}`

**Responses**

- `200` — Response for status 200
- `default` — Problem details (RFC 9457). Any 4xx/5xx response is one \`application/problem+json\` document.

Response example, 200:

```json
{
  "$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"
  }
}
```
