---
title: "Create maintenance window"
method: POST
path: "/api/status-page/{statusPageId}/planned-maintenance/create"
tags: ["Status Page Maintenance"]
---

# Create maintenance window

`POST /api/status-page/{statusPageId}/planned-maintenance/create`

## Request

- Base URL: `https://api.spike.sh`
- URL: `https://api.spike.sh/api/status-page/{statusPageId}/planned-maintenance/create`
- Auth: none declared. Required headers: `x-api-key`
- TypeScript: <https://skmtc.dev/spike/apis/spike-sh-api/docs/api/status-page/:statusPageId/planned-maintenance/create/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new planned maintenance window

## Path parameters

- `statusPageId` string, required

## Headers

- `x-api-key` string, required

## Request body

- object
  - `title` string, required: Maintenance window title
  - `desc` string, required: Maintenance description
  - `startDate` string, required: Start date (DD/MM/YYYY)
  - `endDate` string, required: End date (DD/MM/YYYY)
  - `startTime` string, required: Start time (HH:mm)
  - `endTime` string, required: End time (HH:mm)
  - `notify` boolean: Notify subscribers when maintenance starts
  - `components` string[], required: Array of component IDs
  - `notifyNow` boolean: Send notification about schedule now
  - `notifyOnEnd` boolean: Send notification when maintenance ends
  - `reminders` object[]
    - `time` integer: Reminder time value
    - `unit` 'minutes' | 'hours' | 'days': Time unit for reminder

## Response `200`

Maintenance window created successfully

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/spike/apis/spike-sh-api.md) - [All operations](https://skmtc.dev/spike/apis/spike-sh-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spike/apis/spike-sh-api/revisions/6854629119aa?raw)
