Skip to main content

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"
}
}
FieldTypeDescription
idstringUnique incident identifier
monitorIdstringThe monitor that triggered the incident
startedAtstringISO 8601 timestamp when downtime was first detected
resolvedAtstring|nullISO 8601 timestamp when the endpoint recovered
durationSecondsnumber|nullTotal incident duration in seconds (null if ongoing)
causestring|nullDescription of what caused the incident
acknowledgedAtstring|nullISO 8601 timestamp when someone acknowledged it
acknowledgedBystring|nullUser ID who acknowledged the incident
createdAtstringISO 8601 creation timestamp
monitorobjectSummary 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​

ParameterTypeDefaultDescription
limitnumber50Number of incidents to return (max 200)
offsetnumber0Number of incidents to skip for pagination
monitorIdstring--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=0
Query Parameters
Click ⚙ to configure your API key, then hit Send.

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​

ParameterTypeDescription
idstringThe 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/:id
Path Parameters
Click ⚙ to configure your API key, then hit Send.

Incident Update Object​

Each incident contains a timeline of updates that track status changes.

FieldTypeDescription
idstringUnique update identifier
statusstringStatus at this point: TRIGGERED, ACKNOWLEDGED, RESOLVED
messagestringHuman-readable description of the update
createdBystringUser ID or "system" for automated updates
createdAtstringISO 8601 timestamp of the update

Incident Lifecycle​

TRIGGERED  -->  ACKNOWLEDGED  -->  RESOLVED
| ^
+----------------------------------+
(auto-resolved when endpoint recovers)
  1. TRIGGERED -- Created automatically when consecutive checks fail
  2. ACKNOWLEDGED -- A team member has seen the incident and is investigating
  3. RESOLVED -- The endpoint has recovered and is responding normally