---
title: "Remove a domain"
method: DELETE
path: "/v1/domains/{id}"
tags: ["Domains"]
---

# Remove a domain

`DELETE /v1/domains/{id}`

## Request

- Base URL: `https://api.mails.ai`
- URL: `https://api.mails.ai/v1/domains/{id}`
- Auth: HTTP bearer

**Requires scope:** `manage`. Agents with addresses on this domain stop sending: every send from them is refused with 422 `domain_not_verified` until the domain is added and verified again, or the agent is recreated on your workspace's mails.ai subdomain. It is never sent from another domain instead.

## Path parameters

- `id` string, required

## Response `200`

Deletion confirmation.

- object
  - `id` string, required: Id of the removed domain (`dom_…`): the id in the path.
  - `deleted` boolean, required: Always `true`. A domain that is not in this workspace answers 404 instead.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required scope (`insufficient_scope`), or the token belongs to an app connected by sign-in and this operation is closed to connected apps (`connected_app_not_allowed`).
- `404`: Resource not found in this workspace, or the agent a send names is archived (`agent_archived`).
- `500`: Internal server error.

---

[API](https://skmtc.dev/mails/apis/mails-ai-api.md) · [All operations](https://skmtc.dev/mails/apis/mails-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mails/apis/mails-ai-api/revisions/4d4930a8c33b?raw)
