REST API

Incidents

Incidents are automatically created by the risk worker when anomaly thresholds are exceeded. You can also create them manually. Incidents are broadcast over WebSocket when created or updated.

Incident lifecycle

openinvestigatingresolved
GET/incidents

List incidents for the authenticated organization. Optionally filter by status or project.

Auth:JWT Session (cookie)

Query Parameters

NameTypeRequiredDescription
project_idstringoptionalFilter incidents to a specific project.
status"open" | "investigating" | "resolved"optionalFilter by incident status.
limitnumberoptionalMaximum number of incidents to return. Defaults to 50.
Response
HTTP/1.1 200 OK

[
  {
    "id": "inc_01HX...",
    "title": "Elevated 5xx error rate",
    "status": "open",
    "severity": "critical",
    "projectId": "proj_01HX...",
    "organizationId": "org_01HX...",
    "eventCount": 47,
    "openedAt": "2026-03-12T18:40:00.000Z",
    "resolvedAt": null
  }
]
POST/incidents

Manually create an incident. Useful for flagging known outages or maintenance windows.

Auth:JWT Session (cookie)

Creating an incident via the API triggers a real-time incident_created WebSocket event for all connected dashboard clients in the organization.

Request Body

NameTypeRequiredDescription
titlestringrequiredShort description of the incident.
severity"info" | "warn" | "error" | "critical"requiredIncident severity.
projectIdstringrequiredProject this incident belongs to.
status"open" | "investigating"optionalInitial status. Defaults to open.
Request
POST /incidents HTTP/1.1
Content-Type: application/json

{
  "title": "Payment service degraded",
  "severity": "error",
  "projectId": "proj_01HX..."
}
Response
HTTP/1.1 201 Created

{
  "id": "inc_02HX...",
  "title": "Payment service degraded",
  "status": "open",
  "severity": "error",
  "projectId": "proj_01HX...",
  "organizationId": "org_01HX...",
  "eventCount": 0,
  "openedAt": "2026-03-13T12:00:00.000Z",
  "resolvedAt": null
}