Back to Documentation
Incidents API
List, create, and manage incidents programmatically. Track outages and communicate status to users.
The Incident Object
Represents an incident affecting one or more monitors
{
"id": "inc_a1b2c3d4e5f6",
"title": "API Service Degradation",
"description": "Users experiencing slow response times",
"status": "investigating",
"severity": "major",
"affectedMonitors": ["mon_abc123", "mon_def456"],
"startedAt": "2024-01-15T10:30:00Z",
"resolvedAt": null,
"createdAt": "2024-01-15T10:32:00Z",
"updatedAt": "2024-01-15T10:45:00Z",
"updates": [
{
"id": "upd_xyz789",
"message": "Investigating the root cause",
"status": "investigating",
"createdAt": "2024-01-15T10:32:00Z"
}
]
}Status Values
investigating - Looking into the issueidentified - Root cause foundmonitoring - Fix deployed, monitoringresolved - Incident resolvedSeverity Values
minor - Limited impactmajor - Significant impactcritical - Severe outageGET
/incidentsList all incidents
Request
curl -X GET https://wakestack.co.uk/api/incidents \
-H "Authorization: Bearer wsk_live_your_api_key"Response
[
{
"id": "inc_a1b2c3d4e5f6",
"title": "API Service Degradation",
"status": "investigating",
"severity": "major",
"startedAt": "2024-01-15T10:30:00Z",
...
}
]POST
/incidentsCreate a new incident manually
Request Body
| Parameter | Required | Description |
|---|---|---|
| title | Yes | Incident title |
| description | Yes | Description of the issue |
| severity | No | minor, major, critical |
| affectedMonitors | Yes | Array of monitor IDs |
Example
curl -X POST https://wakestack.co.uk/api/incidents \
-H "Authorization: Bearer wsk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Scheduled Maintenance",
"description": "Performing database upgrades",
"severity": "minor",
"affectedMonitors": ["mon_abc123"]
}'GET
/incidents/:idGet a specific incident
curl -X GET https://wakestack.co.uk/api/incidents/inc_a1b2c3d4e5f6 \
-H "Authorization: Bearer wsk_live_your_api_key"PUT
/incidents/:idUpdate incident status
Update Status Example
curl -X PUT https://wakestack.co.uk/api/incidents/inc_a1b2c3d4e5f6 \
-H "Authorization: Bearer wsk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"status": "identified",
"message": "Root cause identified: Database connection pool exhausted"
}'Resolve Incident
curl -X PUT https://wakestack.co.uk/api/incidents/inc_a1b2c3d4e5f6 \
-H "Authorization: Bearer wsk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"status": "resolved",
"message": "Issue has been resolved. Services operating normally."
}'Automatic Incidents
Incidents created automatically when monitors fail
When a monitor fails and reaches the alert threshold, Wakestack automatically:
- Creates an incident with status "investigating"
- Sets severity based on consecutive failures (1-2: minor, 3-4: major, 5+: critical)
- Sends notifications via configured channels
- Updates your status page (if configured)
When the monitor recovers, the incident is automatically resolved with downtime duration recorded.