---
title: "Get Maintenance Window"
description: "Returns a single maintenance window by ID (including its target relation)."
---

`GET /api/maintenance-windows/:id`

## Authentication

Requires a valid session.

- Header: `Authorization: Bearer <token>`

Note (API token scope): If you use a customer-scoped API token, the window must belong to that customer.

## Parameters

- `id` (Path, required): Maintenance window ID.

## Example (cURL)

```bash
BASE_URL="https://uptimeify.io"
TOKEN="<your-api-token>"

curl -X GET "$BASE_URL/api/maintenance-windows/5" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"
```

## Example Response

```json
{
  "id": 5,
  "websiteId": 101,
  "icmpMonitorId": null,
  "smtpMonitorId": null,
  "sshMonitorId": null,
  "ftpMonitorId": null,
  "imapPopMonitorId": null,
  "customerId": 12,
  "name": "Weekly maintenance",
  "description": "Planned downtime",
  "startTime": "2026-02-25T02:00:00.000Z",
  "endTime": "2026-02-25T04:00:00.000Z",
  "isRecurring": true,
  "recurrencePattern": {
    "frequency": "weekly",
    "interval": 1,
    "daysOfWeek": [1]
  },
  "isActive": true,
  "timezone": "UTC",
  "createdBy": "<user-id>",
  "createdAt": "2026-02-20T10:00:00.000Z",
  "updatedAt": "2026-02-20T10:00:00.000Z",
  "website": {
    "id": 101,
    "url": "https://deinkunde.com"
  }
}
```

Note: Depending on the target, the response may also include one of these relations: `icmpMonitor`, `smtpMonitor`, `sshMonitor`, `ftpMonitor`, `imapPopMonitor`. Nested `customer` objects are not returned.

## Common errors

- `400 Invalid maintenance window ID` when `:id` is invalid
- `404 Maintenance window not found` when the window does not exist
- `401 Unauthorized` when you are not logged in
- `403 Forbidden` when you cannot access the target/customer
- `500 Maintenance window target is missing` if the window has no valid target

