---
title: "Schedule maintenance"
method: POST
path: "/status-pages/{statusPage}/maintenances"
tags: ["Scheduled maintenance"]
---

# Schedule maintenance

`POST /status-pages/{statusPage}/maintenances`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/status-pages/{statusPage}/maintenances`
- Auth: HTTP bearer

Announces it on the page and emails confirmed subscribers unless `notify_subscribers` is
`false`. `scheduled_at` must be in the future.

## Path parameters

- `statusPage` string, uuid, required

## Request body

- CreateScheduledMaintenance: Maintenance to announce on a status page.
  - `title` string, required: Title shown on the page, up to 255 characters
  - `description` string, nullable: What happens and what visitors notice, in Markdown; `null` for none
  - `scheduled_at` string, date-time, required: Planned start, in the future
  - `scheduled_until` string, date-time, nullable: Planned end, after `scheduled_at`; `null` for none
  - `automatic` boolean: `true` (default): starts at `scheduled_at` and completes at `scheduled_until` by itself (without a planned end, complete it by setting `status`). `false`: only changes when you set `status`
  - `mutes_alerts` boolean: `true`: while in progress, mute alerts on the monitors linked to its components. Default `true`
  - `exclude_from_uptime` boolean: With `mutes_alerts`: failed checks of those monitors don't count as downtime. Default `true`
  - `affected_components` StatusPageAffectedComponentInput[]: Components it affects; components of the status page only
    - `component_id` string, uuid, required: A component of the status page
    - `impact` 'none' | 'degraded_performance' | 'partial_outage' | 'major_outage', required: An impact on a status page, including `none`: how an incident or maintenance affects a component, or an incident's overall impact. | | |---| | `none` <br/> No impact (for a component: not affected). | | `degraded_performance` <br/> Slower or less reliable than usual. | | `partial_outage` <br/> Down for some visitors or some functions. | | `major_outage` <br/> Down. |
  - `notify_subscribers` boolean: Email confirmed subscribers about it (default `true`)

## Response `201`

The new maintenance.

- ScheduledMaintenance: Planned maintenance announced on a status page. While it is in progress its components show as under maintenance.
  - `id` string, uuid, required: Maintenance ID
  - `title` string, required: Title shown on the page
  - `description` string, nullable, required: What happens and what visitors notice, in Markdown; `null` for none
  - `status` 'scheduled' | 'in_progress' | 'completed', required: Where a scheduled maintenance stands. | | |---| | `scheduled` <br/> Announced, not started yet. | | `in_progress` <br/> Going on: its components show as under maintenance. | | `completed` <br/> Over. |
  - `automatic` boolean, required: `true`: starts at `scheduled_at` and completes at `scheduled_until` by itself (without a planned end it is completed by hand). `false`: only changes when you set `status`
  - `mutes_alerts` boolean, required: `true`: while in progress, alerts on the monitors linked to its components are muted
  - `exclude_from_uptime` boolean, required: With `mutes_alerts`: failed checks of those monitors don't count as downtime
  - `scheduled_at` string, date-time, required: Planned start
  - `scheduled_until` string, date-time, nullable, required: Planned end; `null` for none
  - `started_at` string, date-time, nullable, required: When it actually went in progress; `null` before
  - `completed_at` string, date-time, nullable, required: When it completed; `null` before
  - `affected_components` StatusPageAffectedComponent[], required: Components it affects
    - `component` StatusPageComponentReference, required: A component of the status page.
      - `id` string, uuid, required: Component ID
      - `name` string, required: Component name
    - `impact` 'none' | 'degraded_performance' | 'partial_outage' | 'major_outage', required: An impact on a status page, including `none`: how an incident or maintenance affects a component, or an incident's overall impact. | | |---| | `none` <br/> No impact (for a component: not affected). | | `degraded_performance` <br/> Slower or less reliable than usual. | | `partial_outage` <br/> Down for some visitors or some functions. | | `major_outage` <br/> Down. |
  - `created_at` string, date-time, required: When it was created

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `FORBIDDEN`: the token lacks an ability this endpoint requires (listed in `details.required_abilities`). `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `404`: `RESOURCE_NOT_FOUND`: there is no such resource in this team.
- `422`: `VALIDATION_FAILED`: the request is invalid; `details.errors` lists the fields.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spectate/apis/spectate-api.md) - [All operations](https://skmtc.dev/spectate/apis/spectate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spectate/apis/spectate-api/revisions/9b1a233997de?raw)
