> For an agent: the map of this documentation is at https://escouade.io/en/mail/docs/llms.txt; every page exists in Markdown, at the same address with `.md` appended.

# `remove_domain`

Remove a domain.

Removes a domain from the space: no more inboxes are created on it, and the mail server stops receiving its mail. Do this before pointing the domain's MX elsewhere. Refused while one of the space's inboxes lives on this domain (delete them first). Then remember to remove its records from your DNS. Irreversible: pass confirm = true; registering it again will give new DKIM keys.

## Access

- **Key**: an Escouade Mail key with `manage_inboxes`.
- **Space**: a verified space.
- **Changes nothing**: no, it acts.
- **Safe to replay**: use an `idempotency_key` where the tool offers one.

## Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | The domain to remove (see list_domains). |
| `confirm` | boolean | yes | Must be true: removal is irreversible. |

## Call it

```sh
curl -s https://api.subagent.fr/v1/remove_domain \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sak_…' \
  -d '{"domain": "…", "confirm": "…"}'
```

The full page in French, with the response fields and every refusal the tool can return: [/mail/docs/reference/remove_domain](https://escouade.io/mail/docs/reference/remove_domain).
