On-Call API › Escalation policies
Update an escalation policy
Changes the policy's settings and steps. A field left out keeps its value,
and so do an empty name or team_id; any other field sent is written,
description: "" included. steps left out keeps the steps; sent, it
replaces the whole list. The repeat and ack-timeout rules below are checked
on the policy as it will be after the change.
Rules for the policy and its steps:
- At least one step.
target_typeisuser,schedule,webhookorslack. Auserstep needstarget_user_id, aschedulesteptarget_schedule_id; aslackstep (legacy) needstarget_slack_channel_id. delay_minutes(the wait before the step) is one of 1, 2, 3, 5, 10, 15, 30 or 60; only the first step may be 0, meaning at once.attemptsis 1–10 (0 or omitted means 1). With more than one attempt,attempt_delay_minutesis one of the same intervals.notify_methodis empty (each person's own notification preferences),push,calloremail. SMS is not available for new steps; existing SMS steps can be kept when a policy is updated.- A user named by a step must be a member who can respond to alerts. A
target_chat_channel_idmust be one of the organization's Microsoft Teams channels. - With
repeat_enabled,repeat_countis 1–5 andrepeat_delay_minutesone of the intervals above. ack_timeout_minutesis 0 (off) or 1–1440; when set,ack_timeout_repeatis 1–5 andack_timeout_reachisothers(default) oracker_first.
Permission (API-key scope): oncall:escalation:write.
Authorization
bearerAuth(oncall:escalation:write)apiKeyHeader(oncall:escalation:write)
Parameters
Path parameters
idstring requiredThe escalation policy's id.
Request body required
Every field is optional; one left out keeps its value.
namestringdescriptionstringteam_idstringrepeat_enabledbooleanrepeat_countintegerrepeat_delay_minutesintegerack_timeout_minutesintegerack_timeout_repeatintegerack_timeout_reachstringstepsarray of EscalationStepWriteShow EscalationStepWrite properties
step_numberintegerdelay_minutesinteger0 (first step only), 1, 2, 3, 5, 10, 15, 30 or 60.target_typeEscalationTargetType requiredtarget_user_idstringtarget_schedule_idstringtarget_schedule_layer_idstringtarget_webhook_urlstringtarget_slack_channel_idstringtarget_slack_channel_namestringOnly together withtarget_slack_channel_id.target_chat_channel_idstringnotify_methodNotifyMethodattemptsinteger1–10; 0 or omitted means 1.attempt_delay_minutesintegerNeeded whenattemptsis more than 1.
Responses
200
The policy after the change.
dataEscalationPolicy requiredShow EscalationPolicy properties
idstringorg_idstringteam_idstringnamestringdescriptionstringrepeat_countintegerrepeat_delay_minutesintegerrepeat_enabledbooleanack_timeout_minutesintegerEscalate again when an acknowledged alert stays unresolved this long; 0 is off.ack_timeout_repeatintegerHow many times that may happen per alert.ack_timeout_reachstringothersgoes past whoever acknowledged;acker_firstreminds them once first. Empty meansothers.stepsarray of EscalationStepShow EscalationStep properties
idstringpolicy_idstringstep_numberintegerdelay_minutesintegerWait before this step.target_typeEscalationTargetTypetarget_user_idstringtarget_schedule_idstringtarget_schedule_layer_idstringPage only this layer of the schedule.target_webhook_urlstringtarget_slack_channel_idstringA Slack channel this step also posts to.target_slack_channel_namestringtarget_chat_channel_idstringA Microsoft Teams channel this step also posts to.notify_methodNotifyMethodattemptsintegerHow many times the step notifies before the policy moves on.attempt_delay_minutesintegercreated_atstring (date-time)updated_atstring (date-time)
external_sourcestringexternal_idstringcreated_atstring (date-time)updated_atstring (date-time)
successboolean required
400
The body is not JSON (INVALID_BODY), or a rule below is broken (VALIDATION_FAILED, the field is named in details).
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 (FORBIDDEN), or team_id names a team the caller is not in (NOT_IN_TEAM).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
404
No escalation policy with this id in your organization (NOT_FOUND).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
422
A step names a person who cannot respond to alerts (CANNOT_RESPOND), or asks for SMS (NOTIFY_METHOD_UNAVAILABLE).
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 PUT 'https://evohub.io/api/v1/escalation-policies/3f8a0b2c-4d6e-4f8a-b1c3-d5e7f9a1b3c5' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"name": "Platform critical",
"steps": [
{
"step_number": 1,
"target_type": "schedule",
"delay_minutes": 0,
"target_schedule_id": "5b1c7d2e-8f3a-4b9c-a0d1-e2f3a4b5c6d7"
}
],
"repeat_enabled": false
}'