Incidents API
Create, read, update, and manage incidents and their updates.
List Incidents
GET /api/v1/incidentsRetrieve incidents for your organization.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter: investigating, identified, monitoring, resolved |
limit | integer | Maximum results (default: 50, max: 100) |
Response
{
"incidents": [
{
"id": "inc_abc123",
"title": "API Performance Degradation",
"description": "Investigating slow response times",
"status": "investigating",
"severity": "minor",
"createdAt": "2024-01-15T12:00:00Z",
"updatedAt": "2024-01-15T12:15:00Z",
"updates": [
{
"id": "upd_xyz789",
"status": "investigating",
"message": "We are investigating reports of slow API responses.",
"createdAt": "2024-01-15T12:00:00Z"
}
]
}
],
"count": 1
}Example
curl -X GET "https://statly.live/api/v1/incidents?status=investigating" \
-H "Authorization: Bearer sk_live_xxx"Create Incident
POST /api/v1/incidentsCreate a new incident.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Incident title (max 200 chars) |
description | string | No | Detailed description |
status | string | No | investigating, identified, monitoring (default: investigating) |
severity | string | No | major, minor, maintenance (default: minor) |
affectedMonitors | array | No | Array of monitor IDs affected |
Example
curl -X POST "https://statly.live/api/v1/incidents" \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"title": "API Performance Degradation",
"description": "Users are experiencing slow response times on API endpoints.",
"severity": "minor",
"status": "investigating",
"affectedMonitors": ["mon_abc123"]
}'Response
{
"id": "inc_abc123",
"title": "API Performance Degradation",
"description": "Users are experiencing slow response times on API endpoints.",
"status": "investigating",
"severity": "minor",
"createdAt": "2024-01-15T12:00:00Z",
"updates": [
{
"id": "upd_xyz789",
"status": "investigating",
"message": "Users are experiencing slow response times on API endpoints.",
"createdAt": "2024-01-15T12:00:00Z"
}
]
}Get Incident
GET /api/v1/incidents/{id}Get details of a specific incident with all updates.
Response
{
"id": "inc_abc123",
"title": "API Performance Degradation",
"status": "resolved",
"severity": "minor",
"createdAt": "2024-01-15T12:00:00Z",
"resolvedAt": "2024-01-15T13:00:00Z",
"updates": [
{
"id": "upd_1",
"status": "investigating",
"message": "We are investigating reports of slow API responses.",
"createdAt": "2024-01-15T12:00:00Z"
},
{
"id": "upd_2",
"status": "identified",
"message": "Root cause identified as database connection pool exhaustion.",
"createdAt": "2024-01-15T12:15:00Z"
},
{
"id": "upd_3",
"status": "resolved",
"message": "Fix deployed. All systems operational.",
"createdAt": "2024-01-15T13:00:00Z"
}
]
}Update Incident
PATCH /api/v1/incidents/{id}Update an incident's status or add a new update message.
Request Body
| Field | Type | Description |
|---|---|---|
title | string | Update the title |
description | string | Update the description |
status | string | New status (creates an update entry) |
severity | string | Update severity |
message | string | Update message (required with status change) |
Example: Add Status Update
curl -X PATCH "https://statly.live/api/v1/incidents/inc_abc123" \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"status": "identified",
"message": "Root cause identified as database connection pool exhaustion. Working on fix."
}'Example: Resolve Incident
curl -X PATCH "https://statly.live/api/v1/incidents/inc_abc123" \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"status": "resolved",
"message": "Fix has been deployed. All systems are operating normally."
}'Delete Incident
DELETE /api/v1/incidents/{id}Delete an incident and all its updates.
⚠️
This permanently removes the incident and its update history. Consider resolving the incident instead of deleting it.
Example
curl -X DELETE "https://statly.live/api/v1/incidents/inc_abc123" \
-H "Authorization: Bearer sk_live_xxx"Response
HTTP/1.1 204 No ContentAdd Incident Update
POST /api/v1/incidents/{id}/updatesAdd an update to an existing incident without changing status.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Update message |
status | string | No | Status (defaults to current) |
Example
curl -X POST "https://statly.live/api/v1/incidents/inc_abc123/updates" \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"message": "We are continuing to monitor the situation. No issues detected in the past 30 minutes."
}'