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 requiredNot blank.severityIncidentSeverity 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)timelinearray of IncidentTimelineEntryThe timeline entries, oldest first. Only in the answer of Get an incident.Show IncidentTimelineEntry properties
idstringincident_idstringauthor_idstringstatusstringThe incident's status when the entry was written.messagestringcreated_atstring (date-time)
created_atstring (date-time)updated_atstring (date-time)versionintegerGoes up by one on every edit of the title, summary, severity or commander (not on acknowledge or resolve). Send it with an update to refuse the edit if someone else changed the incident first.
successboolean required
400
The body is not JSON (INVALID_BODY); title or severity is missing, title is blank or longer than 200 characters, 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 requiredrequest_idstringThe request'sX-Request-ID. Quote it to support.detailsarray 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.request_idstringThe request'sX-Request-ID. Quote it to support.
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe request'sX-Request-ID. Quote it to support.
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.request_idstringThe request'sX-Request-ID. Quote it to support.
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.request_idstringThe request'sX-Request-ID. Quote it to support.
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.request_idstringThe request'sX-Request-ID. Quote it to support.
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe request'sX-Request-ID. Quote it to support.
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.request_idstringThe request'sX-Request-ID. Quote it to support.
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"
}'
