Schedule a Status Page maintenance window.
This endpoint requires an API key with the βCreate status page incidents, status page maintenance windows, and publish status page updatesβ scope.
curl --request POST \
--url https://api.incident.io/v2/status_page_maintenances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"affected_component_ids": [
"01FCNDV6P870EA6S7TK1DSYDG2"
],
"end_at": "2025-01-28T12:00:00Z",
"idempotency_key": "maintenance-12345-abcde",
"maintenance_status": "maintenance_scheduled",
"message": "Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.",
"name": "Routine infrastructure upgrade",
"notify_subscribers": true,
"start_at": "2025-01-28T10:00:00Z",
"status_page_id": "01FCNDV6P870EA6S7TK1DSYDG0"
}
'import requests
url = "https://api.incident.io/v2/status_page_maintenances"
payload = {
"affected_component_ids": ["01FCNDV6P870EA6S7TK1DSYDG2"],
"end_at": "2025-01-28T12:00:00Z",
"idempotency_key": "maintenance-12345-abcde",
"maintenance_status": "maintenance_scheduled",
"message": "Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.",
"name": "Routine infrastructure upgrade",
"notify_subscribers": True,
"start_at": "2025-01-28T10:00:00Z",
"status_page_id": "01FCNDV6P870EA6S7TK1DSYDG0"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
affected_component_ids: ['01FCNDV6P870EA6S7TK1DSYDG2'],
end_at: '2025-01-28T12:00:00Z',
idempotency_key: 'maintenance-12345-abcde',
maintenance_status: 'maintenance_scheduled',
message: 'Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.',
name: 'Routine infrastructure upgrade',
notify_subscribers: true,
start_at: '2025-01-28T10:00:00Z',
status_page_id: '01FCNDV6P870EA6S7TK1DSYDG0'
})
};
fetch('https://api.incident.io/v2/status_page_maintenances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.incident.io/v2/status_page_maintenances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'affected_component_ids' => [
'01FCNDV6P870EA6S7TK1DSYDG2'
],
'end_at' => '2025-01-28T12:00:00Z',
'idempotency_key' => 'maintenance-12345-abcde',
'maintenance_status' => 'maintenance_scheduled',
'message' => 'Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.',
'name' => 'Routine infrastructure upgrade',
'notify_subscribers' => true,
'start_at' => '2025-01-28T10:00:00Z',
'status_page_id' => '01FCNDV6P870EA6S7TK1DSYDG0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.incident.io/v2/status_page_maintenances"
payload := strings.NewReader("{\n \"affected_component_ids\": [\n \"01FCNDV6P870EA6S7TK1DSYDG2\"\n ],\n \"end_at\": \"2025-01-28T12:00:00Z\",\n \"idempotency_key\": \"maintenance-12345-abcde\",\n \"maintenance_status\": \"maintenance_scheduled\",\n \"message\": \"Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.\",\n \"name\": \"Routine infrastructure upgrade\",\n \"notify_subscribers\": true,\n \"start_at\": \"2025-01-28T10:00:00Z\",\n \"status_page_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.incident.io/v2/status_page_maintenances")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"affected_component_ids\": [\n \"01FCNDV6P870EA6S7TK1DSYDG2\"\n ],\n \"end_at\": \"2025-01-28T12:00:00Z\",\n \"idempotency_key\": \"maintenance-12345-abcde\",\n \"maintenance_status\": \"maintenance_scheduled\",\n \"message\": \"Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.\",\n \"name\": \"Routine infrastructure upgrade\",\n \"notify_subscribers\": true,\n \"start_at\": \"2025-01-28T10:00:00Z\",\n \"status_page_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/status_page_maintenances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"affected_component_ids\": [\n \"01FCNDV6P870EA6S7TK1DSYDG2\"\n ],\n \"end_at\": \"2025-01-28T12:00:00Z\",\n \"idempotency_key\": \"maintenance-12345-abcde\",\n \"maintenance_status\": \"maintenance_scheduled\",\n \"message\": \"Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.\",\n \"name\": \"Routine infrastructure upgrade\",\n \"notify_subscribers\": true,\n \"start_at\": \"2025-01-28T10:00:00Z\",\n \"status_page_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n}"
response = http.request(request)
puts response.read_body{
"status_page_maintenance": {
"component_maintenance_periods": [
{
"component_id": "01GW7P4ES31Q6V1ZQH321T0GJN",
"end_at": "2021-08-17T13:28:57.801578Z",
"start_at": "2021-08-17T13:28:57.801578Z"
}
],
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"maintenance_status": "maintenance_scheduled",
"name": "Routine infrastructure upgrade",
"published_at": "2021-08-17T13:28:57.801578Z",
"status_page_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"updates": [
{
"component_statuses": [
{
"component_id": "01FCNDV6P870EA6S7TK1DSYDG2",
"component_status": "operational"
}
],
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"maintenance_status": "maintenance_scheduled",
"message": "abc123",
"published_at": "2021-08-17T13:28:57.801578Z",
"status_page_maintenance_id": "01FCNDV6P870EA6S7TK1DSYDG1"
}
]
}
}Authorizations
API key from your incident.io dashboard (Settings β API keys)
Body
An array of IDs of component affected by the maintenance window
["01FCNDV6P870EA6S7TK1DSYDG2"]
The time the maintenance window ends
"2025-01-28T12:00:00Z"
A unique key to de-duplicate requests. If you send a request with an idempotency_key that was already used, the original response will be returned.
"maintenance-12345-abcde"
Current status for this status page maintenance window
maintenance_scheduled, maintenance_in_progress, maintenance_complete "maintenance_scheduled"
Markdown initial update on this status page maintenance window
4096"Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable."
A title for the maintenance window
200"Routine infrastructure upgrade"
Whether to notify subscribers about this status page maintenance. This will not work if your status page has more than 1000 subscribers.
true
The time the maintenance window starts
"2025-01-28T10:00:00Z"
ID of the status page. You can find this by calling the ListStatusPages endpoint.
"01FCNDV6P870EA6S7TK1DSYDG0"
Response
Created response.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.incident.io/v2/status_page_maintenances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"affected_component_ids": [
"01FCNDV6P870EA6S7TK1DSYDG2"
],
"end_at": "2025-01-28T12:00:00Z",
"idempotency_key": "maintenance-12345-abcde",
"maintenance_status": "maintenance_scheduled",
"message": "Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.",
"name": "Routine infrastructure upgrade",
"notify_subscribers": true,
"start_at": "2025-01-28T10:00:00Z",
"status_page_id": "01FCNDV6P870EA6S7TK1DSYDG0"
}
'import requests
url = "https://api.incident.io/v2/status_page_maintenances"
payload = {
"affected_component_ids": ["01FCNDV6P870EA6S7TK1DSYDG2"],
"end_at": "2025-01-28T12:00:00Z",
"idempotency_key": "maintenance-12345-abcde",
"maintenance_status": "maintenance_scheduled",
"message": "Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.",
"name": "Routine infrastructure upgrade",
"notify_subscribers": True,
"start_at": "2025-01-28T10:00:00Z",
"status_page_id": "01FCNDV6P870EA6S7TK1DSYDG0"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
affected_component_ids: ['01FCNDV6P870EA6S7TK1DSYDG2'],
end_at: '2025-01-28T12:00:00Z',
idempotency_key: 'maintenance-12345-abcde',
maintenance_status: 'maintenance_scheduled',
message: 'Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.',
name: 'Routine infrastructure upgrade',
notify_subscribers: true,
start_at: '2025-01-28T10:00:00Z',
status_page_id: '01FCNDV6P870EA6S7TK1DSYDG0'
})
};
fetch('https://api.incident.io/v2/status_page_maintenances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.incident.io/v2/status_page_maintenances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'affected_component_ids' => [
'01FCNDV6P870EA6S7TK1DSYDG2'
],
'end_at' => '2025-01-28T12:00:00Z',
'idempotency_key' => 'maintenance-12345-abcde',
'maintenance_status' => 'maintenance_scheduled',
'message' => 'Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.',
'name' => 'Routine infrastructure upgrade',
'notify_subscribers' => true,
'start_at' => '2025-01-28T10:00:00Z',
'status_page_id' => '01FCNDV6P870EA6S7TK1DSYDG0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.incident.io/v2/status_page_maintenances"
payload := strings.NewReader("{\n \"affected_component_ids\": [\n \"01FCNDV6P870EA6S7TK1DSYDG2\"\n ],\n \"end_at\": \"2025-01-28T12:00:00Z\",\n \"idempotency_key\": \"maintenance-12345-abcde\",\n \"maintenance_status\": \"maintenance_scheduled\",\n \"message\": \"Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.\",\n \"name\": \"Routine infrastructure upgrade\",\n \"notify_subscribers\": true,\n \"start_at\": \"2025-01-28T10:00:00Z\",\n \"status_page_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.incident.io/v2/status_page_maintenances")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"affected_component_ids\": [\n \"01FCNDV6P870EA6S7TK1DSYDG2\"\n ],\n \"end_at\": \"2025-01-28T12:00:00Z\",\n \"idempotency_key\": \"maintenance-12345-abcde\",\n \"maintenance_status\": \"maintenance_scheduled\",\n \"message\": \"Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.\",\n \"name\": \"Routine infrastructure upgrade\",\n \"notify_subscribers\": true,\n \"start_at\": \"2025-01-28T10:00:00Z\",\n \"status_page_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/status_page_maintenances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"affected_component_ids\": [\n \"01FCNDV6P870EA6S7TK1DSYDG2\"\n ],\n \"end_at\": \"2025-01-28T12:00:00Z\",\n \"idempotency_key\": \"maintenance-12345-abcde\",\n \"maintenance_status\": \"maintenance_scheduled\",\n \"message\": \"Planned maintenance has been scheduled to upgrade our infrastructure. We expect minimal disruption, but some features may be briefly unavailable.\",\n \"name\": \"Routine infrastructure upgrade\",\n \"notify_subscribers\": true,\n \"start_at\": \"2025-01-28T10:00:00Z\",\n \"status_page_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n}"
response = http.request(request)
puts response.read_body{
"status_page_maintenance": {
"component_maintenance_periods": [
{
"component_id": "01GW7P4ES31Q6V1ZQH321T0GJN",
"end_at": "2021-08-17T13:28:57.801578Z",
"start_at": "2021-08-17T13:28:57.801578Z"
}
],
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"maintenance_status": "maintenance_scheduled",
"name": "Routine infrastructure upgrade",
"published_at": "2021-08-17T13:28:57.801578Z",
"status_page_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"updates": [
{
"component_statuses": [
{
"component_id": "01FCNDV6P870EA6S7TK1DSYDG2",
"component_status": "operational"
}
],
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"maintenance_status": "maintenance_scheduled",
"message": "abc123",
"published_at": "2021-08-17T13:28:57.801578Z",
"status_page_maintenance_id": "01FCNDV6P870EA6S7TK1DSYDG1"
}
]
}
}