# Cancel a sending domain

Source: https://won.dev/docs/email/domains-cancel

`DELETE https://api.won.dev/v1/email/domains/{id}`

Stops a sending domain from renewing. It goes on sending until 1 day before `period_end` (`ends_at`), and is then given up: its mailboxes are gone, and so is their address. What it sent and the replies it got stay. Nothing is refunded, and it cannot be undone: buy another with `POST /email/domains`. When it was the sender's last domain, the sender's campaigns pause for `no_domains` then. Canceling again changes nothing. A test key cannot cancel the sandbox's simulated domains. Free.

- **Billing:** Free.

A test key (`won_test_...`) runs this in the [sandbox](/docs/email#sandbox): nothing is sent and nothing is charged.

## Parameters [#parameters]

`id` is part of the path. `DELETE` requests also take an `Idempotency-Key` header, see [Sending a request twice](/docs/email#idempotency).

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Domain ID, such as `dom_5r4k2m9x7p1q8w3e`. |

## Response [#response]

Errors are described in [Errors](/docs/errors).

| Field | Type | Description |
| --- | --- | --- |
| `data` | object |  |
| `data.id` | string | Domain ID, such as `dom_5r4k2m9x7p1q8w3e`. |
| `data.sender_id` | string | The sender it sends for. It never sends for another. |
| `data.domain` | string \| null | The domain name. Null for the minutes after it was paid for, until one is chosen and bought. |
| `data.status` | `setting_up` \| `ramping` \| `active` \| `paused` \| `ending` \| `released` \| `failed` | `setting_up` for the minutes it takes to buy it and set up its mailboxes. `ramping` while it sends a few emails a day more each day, for 5 days. `active` at full speed. `paused` while we hold it back. `ending` once it will not renew: it sends until 1 day before `period_end`. Final: `released` (its mailboxes are gone) and `failed` (it could not be bought; what it cost went back to the balance). |
| `data.end_reason` | `canceled` \| `unpaid` \| `replaced` \| `removed` \| null | Why it ends or ended: `canceled` by you, `unpaid` (the renewal could not be charged), `replaced` by a new domain, `removed` by us. Null while it renews. |
| `data.mailboxes` | object[] | Its mailboxes, 3 as a rule. Empty while it is set up. Replies to them are read for you: you never sign in to them. |
| `data.mailboxes[].address` | string | The address emails go out from, and replies come back to. |
| `data.mailboxes[].name` | string | The name it sends under, the one it was warmed up with. |
| `data.daily_limit` | integer | What its mailboxes may send today, together. |
| `data.full_daily_limit` | integer | What they send a day at full speed, together: 45. |
| `data.sent_today` | integer | Emails they sent since midnight UTC. Answers to replies are left out. |
| `data.full_speed_at` | string \| null | When it reaches full speed, while it is `ramping`. Null otherwise. |
| `data.price_per_month` | number | What a renewal costs, for 30 days, in US dollars. |
| `data.period_end` | string | When the paid period ends. The next one is charged from your balance a few days before, as an ISO 8601 time in UTC. |
| `data.renews` | boolean | Whether it renews at `period_end`. False once you canceled it. |
| `data.ends_at` | string \| null | When it stops sending and its mailboxes are given up, when it will not renew. Null while it renews. |
| `data.renewal_failed_at` | string \| null | When charging the renewal last failed for want of balance. It is tried again until the day before `period_end`, then the domain is given up. Null when nothing failed. |
| `data.stats` | object | The last 30 days. |
| `data.stats.sent` | integer | Emails sent. |
| `data.stats.bounced` | integer | Of them, how many bounced because the mailbox does not exist. |
| `data.stats.bounce_rate` | number | `bounced` over `sent`, 0 to 1. |
| `data.stats.complaints` | integer | Recipients who reported its emails as spam. |
| `data.test` | boolean | The simulated domain of a test key's sender: it never sends for real. |
| `data.created_at` | string | When it was bought, as an ISO 8601 time in UTC. |
| `data.ready_at` | string \| null | When its mailboxes could send. |
| `data.ended_at` | string \| null | When it was released, or failed. |
| `notice` | string \| null | A plain sentence when there is something to know about this answer. Null otherwise. |
| `usage` | object | Nothing is charged here. The balance, for reference. |
| `usage.cost` | number | What this call cost, in US dollars. |
| `usage.balance` | number | The balance left after this call, in US dollars. |
| `usage.replayed` | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |

## Example [#example]

```bash
curl -X DELETE "https://api.won.dev/v1/email/domains/dom_5r4k2m9x7p1q8w3e" \
  -H "Authorization: Bearer $WON_API_KEY"
```

```json
{
  "data": {
    "id": "dom_5r4k2m9x7p1q8w3e",
    "sender_id": "snd_4k2m9x7p1q8w3e5r",
    "domain": "northwindseating.example",
    "status": "ending",
    "end_reason": "canceled",
    "mailboxes": [
      {
        "address": "alex@northwindseating.example",
        "name": "Alex Morgan"
      },
      {
        "address": "alex.morgan@northwindseating.example",
        "name": "Alex Morgan"
      },
      {
        "address": "a.morgan@northwindseating.example",
        "name": "Alex Morgan"
      }
    ],
    "daily_limit": 45,
    "full_daily_limit": 45,
    "sent_today": 31,
    "full_speed_at": null,
    "price_per_month": 27,
    "period_end": "2026-12-28T00:00:00.000Z",
    "renews": false,
    "ends_at": "2026-12-27T00:00:00.000Z",
    "renewal_failed_at": null,
    "stats": {
      "sent": 812,
      "bounced": 9,
      "bounce_rate": 0.0111,
      "complaints": 0
    },
    "test": false,
    "created_at": "2026-11-17T09:20:03.000Z",
    "ready_at": "2026-11-17T09:24:41.000Z",
    "ended_at": null
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```