> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gork.email/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Domain

> Remove a custom domain from your organization.

Deletes a custom domain registration from your organization. Only a domain owned by your organization can be deleted — anything else returns `404 domain_not_found`, so membership cannot be probed.

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token formatted as `Bearer gork_live_...`. Requires the `domains:write` scope.
</ParamField>

### Path parameters

<ParamField body="id" type="string" required>
  The domain ID (`dom_...`).
</ParamField>

<Warning>
  Inboxes provisioned on a deleted domain stop receiving and sending mail for that domain. Deactivate or migrate those inboxes first.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.gork.email/v1/domains/dom_1a2b3c4d5e6f \
    -H "Authorization: Bearer gork_live_YOUR_API_KEY"
  ```

  ```typescript TypeScript theme={null}
  import { Gork } from "@gork/sdk"

  const gork = new Gork({ apiKey: process.env.GORK_API_KEY })

  await gork.domains.delete("dom_1a2b3c4d5e6f")
  ```

  ```python Python theme={null}
  import requests, os

  res = requests.delete(
      "https://api.gork.email/v1/domains/dom_1a2b3c4d5e6f",
      headers={"Authorization": f"Bearer {os.getenv('GORK_API_KEY')}"},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "dom_1a2b3c4d5e6f",
      "status": "deleted"
    }
  }
  ```
</ResponseExample>

| Code               | HTTP | Meaning                                             |
| ------------------ | ---- | --------------------------------------------------- |
| `domain_not_found` | 404  | No domain with this ID exists in your organization. |
