Forums

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

StatusPage API - Unable to Update Components Status when Creating an Incident

Nivi Mor
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!
August 27, 2025

I'm trying to create an incident using the the StatusPage API. I'm getting the error:

{"error":"incident[components] is invalid"}

I'm attaching my script below but the crucial part is the payload which looks like this:

data = {
"incident[name]": "test",
"incident[impact_override]": "critical",
"incident[status]": "investigating",
"incident[body]": "test",
"incident[component_ids]": ["xxx"],
"incident[components]": {"xxx": "degraded_performance"}
}

No matter what I do or what I try, it won't work.

 

import requests

# Replace with your actual page ID and API key
page_id = "xxx"
api_key = "xxx"

url = f"https://api.statuspage.io/v1/pages/{page_id}/incidents"

# Data to send in the POST request
data = {
"incident[name]": "test",
"incident[impact_override]": "critical",
"incident[status]": "investigating",
"incident[body]": "test",
"incident[component_ids]": ["xxx"],
"incident[components]": {"xxx": "degraded_performance"}
}

# Headers with Authorization
headers = {
"Authorization": f"OAuth {api_key}"
}

# Send POST request
response = requests.post(url, headers=headers, data=data)

# Print response
print(response.status_code)
print(response.text)

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events