Incidents API
The Incidents API provides access to your status page’s incident history, including active and resolved incidents.
Endpoints
List Incidents (Paginated)
GET https://statuspage.me/api/status-pages/{slug}/incidents
Filtered Incidents
GET https://statuspage.me/api/status-pages/{slug}/incidents/filter
Daily Incident Counts
GET https://statuspage.me/api/status-pages/{slug}/incidents/daily-counts
List Incidents
Fetch incidents with pagination.
Parameters
| Parameter | Type | Default | Description |
|---|
page | integer | 1 | Page number |
page_size | integer | 20 | Items per page (max 100) |
Example Request
curl "https://statuspage.me/api/status-pages/your-slug/incidents?page=1&page_size=10"
Example Response
{
"incidents": [
{
"id": "abc123",
"title": "API Performance Degradation",
"state": "resolved",
"started_at": "2025-12-09T10:00:00Z",
"resolved_at": "2025-12-09T11:30:00Z",
"components": ["API", "Backend"],
"updates": [
{
"status": "investigating",
"message": "We are investigating reports of slow API responses.",
"created_at": "2025-12-09T10:05:00Z"
},
{
"status": "identified",
"message": "Root cause identified as database connection pool exhaustion.",
"created_at": "2025-12-09T10:30:00Z"
},
{
"status": "resolved",
"message": "Issue has been resolved. All systems operational.",
"created_at": "2025-12-09T11:30:00Z"
}
]
}
],
"page": 1,
"page_size": 10,
"total_pages": 5,
"total_items": 47
}
Filtered Incidents
Fetch incidents filtered by date range.
Parameters
| Parameter | Type | Description |
|---|
month | string | Required. Month in YYYY-MM format (e.g., 2025-12) |
Example Request
# Get incidents from December 2025
curl "https://statuspage.me/api/status-pages/your-slug/incidents/filter?month=2025-12"
Daily Incident Counts
Get a summary of incidents per day for a calendar view.
Parameters
| Parameter | Type | Description |
|---|
month | string | Required. Month in YYYY-MM format (e.g., 2025-12) |
Example Request
curl "https://statuspage.me/api/status-pages/your-slug/incidents/daily-counts?month=2025-12"
Example Response
{
"counts": {
"2025-12-01": 0,
"2025-12-02": 1,
"2025-12-03": 0,
"2025-12-09": 2
},
"start_date": "2025-12-01",
"end_date": "2025-12-31"
}
Incident States
| State | Description |
|---|
investigating | Issue reported, investigating |
identified | Root cause found |
monitoring | Fix deployed, monitoring |
resolved | Issue fully resolved |
JavaScript Example
async function getIncidents(slug, page = 1) {
const url = `https://statuspage.me/api/status-pages/${slug}/incidents?page=${page}`;
const response = await fetch(url);
const data = await response.json();
// Display active incidents
const active = data.incidents.filter(i => i.state !== 'resolved');
console.log('Active incidents:', active.length);
// Display resolved incidents
const resolved = data.incidents.filter(i => i.state === 'resolved');
console.log('Resolved incidents:', resolved.length);
return data;
}
// Fetch recent incidents
getIncidents('your-slug');
Building an Incident History Page
async function buildIncidentHistory(slug) {
// Get daily counts for calendar view
const countsUrl = `https://statuspage.me/api/status-pages/${slug}/incidents/daily-counts`;
const countsResponse = await fetch(countsUrl);
const { counts } = await countsResponse.json();
// Highlight days with incidents in your calendar UI
for (const [date, count] of Object.entries(counts)) {
if (count > 0) {
highlightCalendarDate(date, count);
}
}
// Load detailed incidents for selected month (YYYY-MM format)
const now = new Date();
const month = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}`;
const incidentsUrl = `https://statuspage.me/api/status-pages/${slug}/incidents/filter?month=${month}`;
const incidentsResponse = await fetch(incidentsUrl);
const data = await incidentsResponse.json();
// Render incident list
renderIncidentList(data.incidents);
}
Use Cases
| Use Case | How |
|---|
| Custom dashboard | Display recent incidents in your admin panel |
| Slack bot | Post new incidents to a Slack channel |
| Mobile app | Show incident history in your app |
| Analytics | Track incident frequency over time |
Error Responses
| Status | Error | Cause |
|---|
| 404 | not found | Status page doesn’t exist |
| 400 | invalid parameters | Invalid date or pagination params |
What’s Next?