Maintenances API
Full CRUD access to maintenance windows. Requires maintenances:read or maintenances:write scope.
List maintenances
GET /user/api/v1/maintenances
Required scope: maintenances:read
Query parameters:
| Parameter | Description |
|---|---|
status_page_id | Filter by status page UUID |
Example:
curl -H "Authorization: Bearer spk_..." \
https://statuspage.me/user/api/v1/maintenances
Get a single maintenance
GET /user/api/v1/maintenances/:id
Required scope: maintenances:read
Create a maintenance window
POST /user/api/v1/maintenances
Required scope: maintenances:write
Request body:
{
"status_page_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Scheduled database upgrade",
"message": "We will be performing a database upgrade during this window.",
"start_at": "2026-03-20T02:00:00Z",
"end_at": "2026-03-20T04:00:00Z",
"notify_subscribers": true
}
| Field | Required | Description |
|---|---|---|
status_page_id | Yes | UUID of the status page |
title | Yes | Short description |
start_at | Yes | RFC3339 start time |
end_at | Yes | RFC3339 end time |
message | No | Longer description shown to subscribers |
notify_subscribers | No | Send email to subscribers (default: false) |
Response: 201 Created with the created maintenance object.
Update a maintenance window
PATCH /user/api/v1/maintenances/:id
Required scope: maintenances:write
Request body (all fields optional):
{
"title": "Extended database upgrade",
"end_at": "2026-03-20T06:00:00Z"
}
Delete a maintenance window
DELETE /user/api/v1/maintenances/:id
Required scope: maintenances:write
Automating maintenance from CI/CD
A common use case is to create a maintenance window automatically before a deployment:
# Start maintenance
MAINT_ID=$(curl -s -X POST \
-H "Authorization: Bearer $SPK_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"title\":\"Deploy v2.5.0\",\"status_page_id\":\"$PAGE_ID\",\"start_at\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"end_at\":\"$(date -u -d '+30 minutes' +%Y-%m-%dT%H:%M:%SZ)\"}" \
https://statuspage.me/user/api/v1/maintenances | jq -r '.data.id')
# ... run deployment ...
# Delete maintenance when done
curl -s -X DELETE \
-H "Authorization: Bearer $SPK_TOKEN" \
https://statuspage.me/user/api/v1/maintenances/$MAINT_ID