# List maintenance windows

> List scheduled, running and recently completed maintenance windows on your Uptenna status pages with the API, optionally for one status page.

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

`GET https://uptenna.com/v1/maintenance-windows`

Your maintenance windows that haven't ended, and those that ended in the last 30 days, soonest first.

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status_page_id` | string | no | Only this status page's windows. |

## Example request

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

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

## Response

Returns **200 OK** with `data`, a list of [maintenance window objects](https://uptenna.com/docs/api-objects#maintenance-window).

```json 200 OK
{
  "data": [
    {
      "id": "mnt_F6s2Kd9QwLz3",
      "status_page_id": "sp_Hn4c7VtQ1wXa",
      "title": "Database upgrade",
      "message": "We're upgrading the main database. The API may answer slowly for a few minutes.",
      "starts_at": "2027-01-09T02:00:00.000Z",
      "ends_at": "2027-01-09T04:00:00.000Z",
      "state": "scheduled",
      "monitor_ids": [
        "mon_Xk3v9QmT2bLp"
      ],
      "created_at": "2026-12-01T16:20:31.000Z",
      "updated_at": "2026-12-01T16:20:31.000Z"
    }
  ]
}
```

## Errors

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

| Status | Code | When |
| --- | --- | --- |
| 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. |
