English
API Reference
Incidents

Incidents API

Manage incidents programmatically.

Overview

The Incidents API allows you to:

  • Create and update incidents
  • Add incident updates
  • Manage affected components
  • Create postmortems

Endpoints

MethodEndpointDescription
GET/incidentsList incidents
POST/incidentsCreate incident
GET/incidents/{id}Get incident
PATCH/incidents/{id}Update incident
DELETE/incidents/{id}Delete incident
POST/incidents/{id}/updatesAdd update

List Incidents

GET /api/v1/incidents

Query Parameters

ParameterTypeDescription
statusstringinvestigating, identified, monitoring, resolved
impactstringminor, major, critical
resolvedbooleanFilter by resolved state
componentIdstringFilter by affected component
fromstringStart date (ISO 8601)
tostringEnd date (ISO 8601)
pagenumberPage number
pageSizenumberItems per page

Response

{
  "data": [
    {
      "id": "inc_123",
      "title": "API Response Delays",
      "status": "resolved",
      "impact": "major",
      "message": "We are investigating...",
      "components": [
        {
          "id": "comp_456",
          "name": "API Server",
          "status": "operational"
        }
      ],
      "updates": [...],
      "createdAt": "2026-01-22T10:00:00Z",
      "resolvedAt": "2026-01-22T11:30:00Z"
    }
  ],
  "meta": {
    "total": 50,
    "page": 1,
    "pageSize": 20
  }
}

Create Incident

POST /api/v1/incidents

Request Body

{
  "title": "API Response Delays",
  "status": "investigating",
  "impact": "major",
  "message": "We are investigating reports of slow API response times.",
  "componentIds": ["comp_456"],
  "componentStatuses": {
    "comp_456": "degraded_performance"
  }
}

Response

{
  "id": "inc_789",
  "title": "API Response Delays",
  "status": "investigating",
  "impact": "major",
  "message": "We are investigating...",
  "components": [...],
  "createdAt": "2026-01-22T10:00:00Z"
}

Get Incident

GET /api/v1/incidents/{id}

Query Parameters

ParameterTypeDescription
includestringComma-separated: updates, postmortem

Response

{
  "id": "inc_123",
  "title": "API Response Delays",
  "status": "resolved",
  "impact": "major",
  "message": "We are investigating...",
  "components": [...],
  "updates": [
    {
      "id": "upd_1",
      "status": "investigating",
      "message": "We are investigating...",
      "createdAt": "2026-01-22T10:00:00Z"
    },
    {
      "id": "upd_2",
      "status": "identified",
      "message": "Root cause identified...",
      "createdAt": "2026-01-22T10:30:00Z"
    }
  ],
  "postmortem": {
    "summary": "...",
    "rootCause": "...",
    "isPublished": true
  },
  "createdAt": "2026-01-22T10:00:00Z",
  "resolvedAt": "2026-01-22T11:30:00Z"
}

Update Incident

PATCH /api/v1/incidents/{id}

Request Body

{
  "title": "Updated Title",
  "impact": "critical"
}

Add Update

POST /api/v1/incidents/{id}/updates

Request Body

{
  "status": "identified",
  "message": "We have identified the root cause as database connection pool exhaustion.",
  "componentStatuses": {
    "comp_456": "degraded_performance"
  }
}

Resolving

To resolve an incident:

{
  "status": "resolved",
  "message": "The issue has been resolved.",
  "componentStatuses": {
    "comp_456": "operational"
  }
}

Delete Incident

DELETE /api/v1/incidents/{id}

Response

{
  "success": true
}

Incident Object

FieldTypeDescription
idstringUnique identifier
titlestringIncident title
statusstringCurrent status
impactstringSeverity level
messagestringInitial/latest message
componentsarrayAffected components
updatesarrayStatus updates
postmortemobjectPostmortem content
createdAtstringCreation timestamp
resolvedAtstringResolution timestamp

Status Values

StatusDescription
investigatingLooking into the issue
identifiedRoot cause found
monitoringFix applied, watching
resolvedIssue fixed

Impact Values

ImpactDescription
minorMinimal user impact
majorSignificant impact
criticalService unavailable

Component Status Mapping

When creating/updating incidents, you can set affected component status:

Component StatusDescription
operationalNormal operation
degraded_performanceSlow but working
partial_outagePartial functionality
major_outageService down

Examples

Create Incident

curl -X POST https://your-domain.com/api/v1/incidents \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Database Connectivity Issues",
    "status": "investigating",
    "impact": "major",
    "message": "We are investigating reports of database connectivity issues.",
    "componentIds": ["comp_db"],
    "componentStatuses": {
      "comp_db": "major_outage"
    }
  }'

Add Update

curl -X POST https://your-domain.com/api/v1/incidents/inc_123/updates \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "identified",
    "message": "The database primary node has failed. Failover to replica in progress."
  }'

Resolve Incident

curl -X POST https://your-domain.com/api/v1/incidents/inc_123/updates \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "resolved",
    "message": "Failover complete. All services restored.",
    "componentStatuses": {
      "comp_db": "operational"
    }
  }'

List Active Incidents

curl "https://your-domain.com/api/v1/incidents?resolved=false" \
  -H "Authorization: Bearer sk_live_xxx"

List Last 7 Days

curl "https://your-domain.com/api/v1/incidents?from=2026-01-15T00:00:00Z&to=2026-01-22T23:59:59Z" \
  -H "Authorization: Bearer sk_live_xxx"