# DELETE /api/v1/domains/:id

Auth: Bearer

HTML: https://cooperemail.com/docs/reference/domain-delete

## Summary

Remove the domain. When dns.mode is automatic, Cooper deletes only the DNS records it wrote and returns dns_cleanup with removed roles and errors. A manual domain is removed with an empty cleanup. Another account's id returns 404 domain_not_found.

## Request

This call has no JSON body.

## Response

HTTP 200. Sample values illustrate the schema.

```json
{
  "id": "inb_example",
  "deleted": true,
  "dns_cleanup": {
    "removed": [
      "string"
    ],
    "errors": [
      "string"
    ]
  }
}
```

## Errors

- HTTP 404 domain_not_found

The live `message` is the sentence for that code. Branch on `code`.

```json
{
  "error": {
    "type": "not_found",
    "code": "domain_not_found",
    "docs_url": "https://cooperemail.com/docs#domain_not_found"
  }
}
```

## Idempotency

This route does not document Idempotency-Key or client_id.
