Incidents API
Incidents are automatically created when a monitor detects that an endpoint is down. They track the full lifecycle of an outage, from detection through acknowledgment to resolution.
Incident Object
{
"id": "inc_abc123def456",
"monitorId": "cly1abc2d0001abcdef012345",
"startedAt": "2025-01-15T09:28:00.000Z",
"resolvedAt": "2025-01-15T09:45:00.000Z",
"durationSeconds": 1020,
"cause": "Expected status 200, got 503",
"acknowledgedAt": "2025-01-15T09:30:00.000Z",
"acknowledgedBy": "user_abc123",
"createdAt": "2025-01-15T09:28:00.000Z",
"monitor": {
"id": "cly1abc2d0001abcdef012345",
"name": "Production API",
"url": "https://api.example.com/health"
}
}
| Field | Type | Description |
|---|---|---|
id | string | Unique incident identifier |
monitorId | string | The monitor that triggered the incident |
startedAt | string | ISO 8601 timestamp when downtime was first detected |
resolvedAt | string|null | ISO 8601 timestamp when the endpoint recovered |
durationSeconds | number|null | Total incident duration in seconds (null if ongoing) |
cause | string|null | Description of what caused the incident |
acknowledgedAt | string|null | ISO 8601 timestamp when someone acknowledged it |
acknowledgedBy | string|null | User ID who acknowledged the incident |
createdAt | string | ISO 8601 creation timestamp |
monitor | object | Summary of the associated monitor |
List Incidents
GET /v1/incidents
Returns a paginated list of incidents for your organization, ordered by most recent first.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Number of incidents to return (max 200) |
offset | number | 0 | Number of incidents to skip for pagination |
monitorId | string | -- | Filter incidents by monitor ID |
Example Request
curl "https://api.sentro.dev/v1/incidents?limit=10" \
-H "Authorization: Bearer sentro_sk_live_your_key_here"
Response 200 OK
{
"data": [
{
"id": "inc_abc123def456",
"monitorId": "cly1abc2d0001abcdef012345",
"startedAt": "2025-01-15T09:28:00.000Z",
"resolvedAt": "2025-01-15T09:45:00.000Z",
"durationSeconds": 1020,
"cause": "Expected status 200, got 503",
"acknowledgedAt": "2025-01-15T09:30:00.000Z",
"acknowledgedBy": "user_abc123",
"createdAt": "2025-01-15T09:28:00.000Z",
"monitor": {
"id": "cly1abc2d0001abcdef012345",
"name": "Production API",
"url": "https://api.example.com/health"
}
},
{
"id": "inc_ghi789jkl012",
"monitorId": "cly1abc2d0001abcdef012345",
"startedAt": "2025-01-14T03:12:00.000Z",
"resolvedAt": "2025-01-14T03:18:00.000Z",
"durationSeconds": 360,
"cause": "Request timed out after 30000ms",
"acknowledgedAt": null,
"acknowledgedBy": null,
"createdAt": "2025-01-14T03:12:00.000Z",
"monitor": {
"id": "cly1abc2d0001abcdef012345",
"name": "Production API",
"url": "https://api.example.com/health"
}
}
],
"meta": {
"total": 47,
"limit": 10,
"offset": 0
}
}
Try it
List all incidents across your organization.
GET
/v1/incidents?limit=10&offset=0Query Parameters
Filter by Monitor
curl "https://api.sentro.dev/v1/incidents?monitorId=cly1abc2d0001abcdef012345" \
-H "Authorization: Bearer sentro_sk_live_your_key_here"
Get Incident
GET /v1/incidents/:id
Returns a single incident with its full update history.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The incident ID |
Response 200 OK
{
"data": {
"id": "inc_abc123def456",
"monitorId": "cly1abc2d0001abcdef012345",
"startedAt": "2025-01-15T09:28:00.000Z",
"resolvedAt": "2025-01-15T09:45:00.000Z",
"durationSeconds": 1020,
"cause": "Expected status 200, got 503",
"acknowledgedAt": "2025-01-15T09:30:00.000Z",
"acknowledgedBy": "user_abc123",
"createdAt": "2025-01-15T09:28:00.000Z",
"monitor": {
"id": "cly1abc2d0001abcdef012345",
"name": "Production API",
"url": "https://api.example.com/health"
},
"updates": [
{
"id": "upd_001",
"status": "RESOLVED",
"message": "Endpoint is responding normally again",
"createdBy": "system",
"createdAt": "2025-01-15T09:45:00.000Z"
},
{
"id": "upd_002",
"status": "ACKNOWLEDGED",
"message": "Looking into the issue",
"createdBy": "user_abc123",
"createdAt": "2025-01-15T09:30:00.000Z"
},
{
"id": "upd_003",
"status": "TRIGGERED",
"message": "Monitor detected downtime: Expected status 200, got 503",
"createdBy": "system",
"createdAt": "2025-01-15T09:28:00.000Z"
}
]
}
}
Error
{
"error": {
"code": "NOT_FOUND",
"message": "Incident with id 'inc_invalid' not found"
}
}
Try it
Get a single incident with its full update timeline.
GET
/v1/incidents/:idPath Parameters
Incident Update Object
Each incident contains a timeline of updates that track status changes.
| Field | Type | Description |
|---|---|---|
id | string | Unique update identifier |
status | string | Status at this point: TRIGGERED, ACKNOWLEDGED, RESOLVED |
message | string | Human-readable description of the update |
createdBy | string | User ID or "system" for automated updates |
createdAt | string | ISO 8601 timestamp of the update |
Incident Lifecycle
TRIGGERED --> ACKNOWLEDGED --> RESOLVED
| ^
+----------------------------------+
(auto-resolved when endpoint recovers)
- TRIGGERED -- Created automatically when consecutive checks fail
- ACKNOWLEDGED -- A team member has seen the incident and is investigating
- RESOLVED -- The endpoint has recovered and is responding normally