On-Call API › Incidents
Declare an incident
Declares an incident. It starts investigating, with the caller as commander
unless commander_id names someone else, who must be a member who can respond
to alerts.
To record an incident that already ended, send both started_at and
resolved_at: it is stored resolved, with those times.
Permission (API-key scope): oncall:incident:write.
Authorization
bearerAuth(oncall:incident:write)apiKeyHeader(oncall:incident:write)
Request body required
titlestring requiredseverityIncidentSeverity requiredsummarystringcommander_idstringDefaults to the caller.started_atstring (date-time)Withresolved_at: record an incident that already ended.resolved_atstring (date-time)Withstarted_at: record an incident that already ended. Must be afterstarted_atand not in the future.
Responses
201
The incident.
dataIncident requiredShow Incident properties
idstring requiredorg_idstringnumberinteger requiredSequential number within the organization.titlestring requiredsummarystringseverityIncidentSeverity requiredstatusIncidentStatus requiredcommander_idstringstarted_atstring (date-time) requiredidentified_atstring (date-time)resolved_atstring (date-time)created_atstring (date-time)updated_atstring (date-time)
successboolean required
400
The body is not JSON (INVALID_BODY); title or severity is missing or severity is not one of the four values, or the past times are not a start before an end that has already happened (VALIDATION_FAILED).
errorobject requiredcodestring requiredmessagestring requireddetailsarray of object requiredfieldstringmessagestring
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
404
commander_id is not a member of the organization (NOT_A_MEMBER).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
422
The person cannot respond to alerts: they do not hold oncall:alert:respond (CANNOT_RESPOND).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
429
Too many requests (RATE_LIMITED). Wait Retry-After seconds.
Retry-AfterintegerSeconds to wait.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
503
Whether the person may be paged could not be checked right now; nothing was changed (MEMBER_CHECK_UNAVAILABLE). Retry shortly.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
Example request
curl -X POST 'https://evohub.io/api/v1/incidents' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"title": "Checkout payments failing",
"summary": "Card payments time out for about 30% of customers.",
"severity": "major"
}'