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

# Delete a domain

> DELETE /v1/domains/{id} — remove a domain. Refused with 409 if it has sending history.

Remove a domain and tear down its DKIM identity. Allowed only when the domain has never been used to send — history is kept immutable.

**`DELETE /v1/domains/{id}`**

Deleting a domain removes it from the project and, when no sibling project still uses the same domain name, releases the underlying sending identity. This is the path to take when you mistyped a domain and want to re-add it cleanly.

## Path parameters

<ParamField body="id" type="string" required>
  The domain id to delete, for example `dom_01HZ8K3M9P`.
</ParamField>

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://api.drin.run/v1/domains/dom_01HZ8K3M9P \
    -H "Authorization: Bearer $DRIN_API_KEY"
  ```

  ```typescript Node.js theme={null}
  import { DrinClient } from "@drin00/sdk";

  const drin = new DrinClient({ apiKey: process.env.DRIN_API_KEY });

  await drin.domains.delete("dom_01HZ8K3M9P");
  ```
</CodeGroup>

## Response

`204 No Content` on success — there is no response body.

<Warning>
  **409 on sending history.** A domain that has ever sent mail cannot be deleted — the request is refused with `409 Conflict` so the audit trail stays intact. Disable [receiving](/api-reference/domains/receiving) or stop sending from it instead.
</Warning>

```json theme={null}
{
  "error": {
    "type": "conflict",
    "message": "Domain has sending history and cannot be deleted."
  }
}
```
