# Cancel maintenance

> Cancel a scheduled maintenance window with the Uptenna API. Subscribers who got the notice hear it's off; past windows leave the status page.

Source: https://uptenna.com/docs/api-delete-maintenance  
Markdown: https://uptenna.com/docs/api-delete-maintenance.md

`DELETE https://uptenna.com/v1/maintenance-windows/{id}`

Cancel a maintenance window (subscribers who were told get a cancellation email), or remove a past one from the page.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The maintenance window's id (`mnt_…`). |

## Example request

```bash curl
curl -X DELETE "https://uptenna.com/v1/maintenance-windows/mnt_F6s2Kd9QwLz3" \
  -H "Authorization: Bearer $UPTENNA_API_KEY"
```

```js Node.js (fetch)
const res = await fetch("https://uptenna.com/v1/maintenance-windows/mnt_F6s2Kd9QwLz3", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.UPTENNA_API_KEY}`,
  },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();
```

## Response

Returns **200 OK**.

```json 200 OK
{
  "id": "mnt_F6s2Kd9QwLz3",
  "deleted": true
}
```

## Errors

Errors look like `{ "error": { "code", "message" } }` (see [Errors](https://uptenna.com/docs/api#errors)).

| Status | Code | When |
| --- | --- | --- |
| 404 | `not_found` | No maintenance window with this id in your account. |
| 401 | `unauthorized` | The Authorization header is missing, malformed, or the key is unknown or revoked. |
| 429 | `rate_limited` | More than 120 requests in 60 seconds with this key. Wait for the Retry-After header's seconds. |
