> For the complete documentation index, see [llms.txt](https://docs.spike.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spike.sh/spike-api-docs/planned-maintenances.md).

# Planned Maintenances

Schedule and update planned maintenance windows on a status page.

## Get ongoing planned maintenances

> Get a list of ongoing maintenances

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances","description":"Schedule and update planned maintenance windows on a status page."}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance":{"get":{"operationId":"getApiStatusPageByStatusPageIdPlannedMaintenance","summary":"Get ongoing planned maintenances","description":"Get a list of ongoing maintenances","tags":["Planned maintenances"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get upcoming planned maintenances

> Get a list of upcoming maintenances

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances","description":"Schedule and update planned maintenance windows on a status page."}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/upcoming":{"get":{"operationId":"getApiStatusPageByStatusPageIdPlannedMaintenanceUpcoming","summary":"Get upcoming planned maintenances","description":"Get a list of upcoming maintenances","tags":["Planned maintenances"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get a list of previous maintenances

> Get a list of all the previous maintenanecs

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances","description":"Schedule and update planned maintenance windows on a status page."}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/previous":{"get":{"operationId":"getApiStatusPageByStatusPageIdPlannedMaintenancePrevious","summary":"Get a list of previous maintenances","description":"Get a list of all the previous maintenanecs","tags":["Planned maintenances"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get a planned maintenance

> Get a planned maintenance

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances","description":"Schedule and update planned maintenance windows on a status page."}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/{pm_id}":{"get":{"operationId":"getApiStatusPageByStatusPageIdPlannedMaintenanceByPmId","summary":"Get a planned maintenance","description":"Get a planned maintenance","tags":["Planned maintenances"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"},{"name":"pm_id","in":"path","required":true,"schema":{"type":"string"},"description":"pm_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create a new planned maintenance

> Create a new planned maintenance\
> \`\`\`\
> {\
> &#x9;"title": "planned maintenance title",\
> &#x9;"desc": "Write a message to your subscribers.",\
> &#x9;"startDate": "10/03/2023",\
> &#x9;"endDate": "13/03/2023",\
> &#x9;"startTime": "10:00",\
> &#x9;"endTime": "05:00",\
> &#x9;"notify": true,\
> &#x9;"components": \["{{ \_.component\_id }}"],\
> &#x9;"notifyNow": true,\
> &#x9;"notifyOnEnd": true,\
> &#x9;"reminders": \[\
> &#x9;	{\
> &#x9;		"time": 2,\
> &#x9;		"unit": "days"\
> &#x9;	}\
> &#x9;]\
> }\
> \`\`\`\
> \### \\\* ALL THE TIMESTAMPS SHOULD BE IN UTC\
> \
> \### Params:\
> \`title\`: Title of the planned maintenanace\
> \
> \`desc\`: Write a message to your subscribers.\
> \
> \
> \`startDate\`: Start date is mandatory. Strict form is DD/MM/YYYY.\
> \
> \`endDate\`: End date is mandatory. Strict form is DD/MM/YYYY.\
> \
> \`startTime\`: Start time format is HH:MM in 24-hour format. Please do not add AM or PM.\
> \
> \`endTime\`: End time format is HH:MM in 24-hour format. Please do not add AM or PM.\
> \
> \`notify\`: You can specify to notify the subscribers about the planned maintenance when planned maintenance starts. \`Type: Boolean\`\
> \
> \`components\`: Components is the array of component ids which are going into planned maintenance.\
> \
> \`notifyNow\`: Send a notification to you subscribers about planned maintenance schedule. \`Type: Boolean\`\
> \
> \`notifyOnEnd\`: Send a notification on the end of planned maintenance. \`Type: Boolean\`\
> \
> \`reminders\`: You can provide a list of reminders that will be sent before the planned maintenance starts. you can choose to send reminder \`days\`, \`hours\` or \`minutes\` before planned maintenance starts. all the units have a max limit of 30 days.<br>

````json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances","description":"Schedule and update planned maintenance windows on a status page."}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/create":{"post":{"operationId":"postApiStatusPageByStatusPageIdPlannedMaintenanceCreate","summary":"Create a new planned maintenance","description":"Create a new planned maintenance\n```\n{\n\t\"title\": \"planned maintenance title\",\n\t\"desc\": \"Write a message to your subscribers.\",\n\t\"startDate\": \"10/03/2023\",\n\t\"endDate\": \"13/03/2023\",\n\t\"startTime\": \"10:00\",\n\t\"endTime\": \"05:00\",\n\t\"notify\": true,\n\t\"components\": [\"{{ _.component_id }}\"],\n\t\"notifyNow\": true,\n\t\"notifyOnEnd\": true,\n\t\"reminders\": [\n\t\t{\n\t\t\t\"time\": 2,\n\t\t\t\"unit\": \"days\"\n\t\t}\n\t]\n}\n```\n### \\* ALL THE TIMESTAMPS SHOULD BE IN UTC\n\n### Params:\n`title`: Title of the planned maintenanace\n\n`desc`: Write a message to your subscribers.\n\n\n`startDate`: Start date is mandatory. Strict form is DD/MM/YYYY.\n\n`endDate`: End date is mandatory. Strict form is DD/MM/YYYY.\n\n`startTime`: Start time format is HH:MM in 24-hour format. Please do not add AM or PM.\n\n`endTime`: End time format is HH:MM in 24-hour format. Please do not add AM or PM.\n\n`notify`: You can specify to notify the subscribers about the planned maintenance when planned maintenance starts. `Type: Boolean`\n\n`components`: Components is the array of component ids which are going into planned maintenance.\n\n`notifyNow`: Send a notification to you subscribers about planned maintenance schedule. `Type: Boolean`\n\n`notifyOnEnd`: Send a notification on the end of planned maintenance. `Type: Boolean`\n\n`reminders`: You can provide a list of reminders that will be sent before the planned maintenance starts. you can choose to send reminder `days`, `hours` or `minutes` before planned maintenance starts. all the units have a max limit of 30 days.\n","tags":["Planned maintenances"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"desc":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"notify":{"type":"boolean"},"components":{"type":"array","items":{"type":"string"}},"notifyNow":{"type":"boolean"},"notifyOnEnd":{"type":"boolean"},"reminders":{"type":"array","items":{"type":"object","properties":{"time":{"type":"integer"},"unit":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Edit a planned maintenance

> Edit a planned maintenance\
> \`\`\`\
> {\
> &#x9;"title": "planned maintenance title",\
> &#x9;"desc": "Write a message to your subscribers.",\
> &#x9;"startDate": "10/03/2023",\
> &#x9;"endDate": "13/03/2023",\
> &#x9;"startTime": "10:00",\
> &#x9;"endTime": "05:00",\
> &#x9;"notify": true,\
> &#x9;"components": \["{{ \_.component\_id }}"],\
> &#x9;"notifyNow": true,\
> &#x9;"notifyOnEnd": true,\
> &#x9;"reminders": \[\
> &#x9;		{\
> &#x9;				"time": 2,\
> &#x9;				"unit": "days"\
> &#x9;		}\
> &#x9;]\
> }\
> \`\`\`\
> \### \\\* ALL THE TIMESTAMPS SHOULD BE IN UTC\
> \
> \### Params:\
> \`title\`: Title of the planned maintenanace\
> \
> \`desc\`: Write a message to your subscribers.\
> \
> \`startDate\`: Start date is mandatory. Strict form is DD/MM/YYYY.\
> \
> \`endDate\`: End date is mandatory. Strict form is DD/MM/YYYY.\
> \
> \`startTime\`: Start time format is HH:MM in 24-hour format. Please do not add AM or PM.\
> \
> \`endTime\`: End time format is HH:MM in 24-hour format. Please do not add AM or PM.\
> \
> \`notify\`: You can specify to notify the subscribers about the planned maintenance when planned maintenance starts. \`Type: Boolean\`\
> \
> \`components\`: Components is the array of component ids which are going into planned maintenance.\
> \
> \`notifyNow\`: Send a notification to you subscribers about planned maintenance schedule. \`Type: Boolean\`\
> \
> \`notifyOnEnd\`: Send a notification on the end of planned maintenance. \`Type: Boolean\`\
> \
> \`reminders\`: You can provide a list of reminders that will be sent before the planned maintenance starts. you can choose to send reminder \`days\`, \`hours\` or \`minutes\` before planned maintenance starts. all the units have a max limit of 30 days.<br>

````json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances","description":"Schedule and update planned maintenance windows on a status page."}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/{pm_id}/update":{"post":{"operationId":"postApiStatusPageByStatusPageIdPlannedMaintenanceByPmIdUpdate","summary":"Edit a planned maintenance","description":"Edit a planned maintenance\n```\n{\n\t\"title\": \"planned maintenance title\",\n\t\"desc\": \"Write a message to your subscribers.\",\n\t\"startDate\": \"10/03/2023\",\n\t\"endDate\": \"13/03/2023\",\n\t\"startTime\": \"10:00\",\n\t\"endTime\": \"05:00\",\n\t\"notify\": true,\n\t\"components\": [\"{{ _.component_id }}\"],\n\t\"notifyNow\": true,\n\t\"notifyOnEnd\": true,\n\t\"reminders\": [\n\t\t\t{\n\t\t\t\t\t\"time\": 2,\n\t\t\t\t\t\"unit\": \"days\"\n\t\t\t}\n\t]\n}\n```\n### \\* ALL THE TIMESTAMPS SHOULD BE IN UTC\n\n### Params:\n`title`: Title of the planned maintenanace\n\n`desc`: Write a message to your subscribers.\n\n`startDate`: Start date is mandatory. Strict form is DD/MM/YYYY.\n\n`endDate`: End date is mandatory. Strict form is DD/MM/YYYY.\n\n`startTime`: Start time format is HH:MM in 24-hour format. Please do not add AM or PM.\n\n`endTime`: End time format is HH:MM in 24-hour format. Please do not add AM or PM.\n\n`notify`: You can specify to notify the subscribers about the planned maintenance when planned maintenance starts. `Type: Boolean`\n\n`components`: Components is the array of component ids which are going into planned maintenance.\n\n`notifyNow`: Send a notification to you subscribers about planned maintenance schedule. `Type: Boolean`\n\n`notifyOnEnd`: Send a notification on the end of planned maintenance. `Type: Boolean`\n\n`reminders`: You can provide a list of reminders that will be sent before the planned maintenance starts. you can choose to send reminder `days`, `hours` or `minutes` before planned maintenance starts. all the units have a max limit of 30 days.\n","tags":["Planned maintenances"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"},{"name":"pm_id","in":"path","required":true,"schema":{"type":"string"},"description":"pm_id parameter"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"desc":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"notify":{"type":"boolean"},"components":{"type":"array","items":{"type":"string"}},"notifyNow":{"type":"boolean"},"notifyOnEnd":{"type":"boolean"},"reminders":{"type":"array","items":{"type":"object","properties":{"time":{"type":"integer"},"unit":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````
