Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make the “Planned Maintenance” section of the public page appear when calling the API

David Rodriguez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 8, 2025

I am creating a maintenance from the Statuspage API via PowerShell code, it works, but I never see the Planned Maintenance section of the customer-facing status page. Here is my code:

$pageId = "dty*****b6"
$apiKey = "ATCTT3x******************************50BFDF09"
$componentId = "0vyd1btwylsc" # prodinstance01

$scheduledFor = (Get-Date "2025-10-08 21:52:00Z").ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
$scheduledUntil = (Get-Date "2025-10-08 21:55:00Z").ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")

$body = @{
incident = @{
name = "Upgrade to v25.12 PRODUCTION clients."
status = "scheduled"
incident_type = "maintenance" #ensures it shows in the public Maintenance UI
body = "We will be performing scheduled PROD upgrade to v25.12"
impact_override = "minor"
scheduled_for = $scheduledFor
scheduled_until = $scheduledUntil

# Auto-transition flags
scheduled_auto_in_progress = $true
scheduled_auto_completed = $true
auto_transition_to_maintenance_state = $true
auto_transition_to_operational_state = $true
auto_transition_deliver_notifications_at_start = $true
auto_transition_deliver_notifications_at_end = $true

components = @{
"0vyd1btwylsc" = "under_maintenance"
"n2d0f5kq06b7" = "under_maintenance"
"gkb3538bc3ln" = "under_maintenance"
}
}
} | ConvertTo-Json -Depth 5

$response = Invoke-RestMethod `
-Uri "https://api.statuspage.io/v1/pages/$pageId/incidents.json" `
-Method Post `
-Headers @{ "Authorization" = "OAuth $apiKey"; "Content-Type" = "application/json" } `
-Body $body




0 answers

Suggest an answer

Log in or Sign up to answer