Update escalation policy

Update an existing escalation policy. Send only the parameters you wish to change (eg. name).

PATCH https://incidents.betterstack.com/api/v3/policies/{policy_id}

URL parameters

policy_id
required integer

Headers

Authorization
required string
Content-Type
string

Body parameters

name
string
repeat_count
integer
repeat_delay
integer
steps
array
steps.0.type
required string
steps.0.wait_before
integer
steps.0.wait_until_time
string
steps.0.wait_until_timezone
string
steps.0.wait_until_days
array
steps.0.urgency_id
integer
steps.0.step_members
array
steps.0.step_members.0.type
required string
steps.0.step_members.0.id
string
steps.0.step_members.0.email
string
steps.0.step_members.0.metadata_key
string
steps.0.timezone
string
steps.0.days
array
steps.0.time_from
string
steps.0.time_to
string
steps.0.metadata_key
string
steps.0.metadata_values
array
steps.0.action_type
string
steps.0.policy_id
integer
steps.0.policy_metadata_key
string
steps.0.instructions_comment
string
steps.0.instructions_reminder_enabled
boolean
steps.0.instructions_reminder_interval_hours
integer
fallback_policy_id
integer
policy_group_id
integer
200

Response body

{
  "data": {
    "id": "456",
    "type": "policy",
    "attributes": {
      "name": "Policy A",
      "repeat_count": 5,
      "repeat_delay": 0,
      "fallback_policy_id": null,
      "incident_token": "8nEiLj2gfqjfQRK6vzkFuGC25",
      "policy_group_id": null,
      "team_name": "Test team",
      "steps": [
        {
          "type": "escalation",
          "wait_before": 0,
          "urgency_id": 12345,
          "step_members": [
            {
              "type": "all_slack_integrations"
            },
            {
              "type": "current_on_call"
            }
          ]
        }
      ]
    }
  }
}

Example cURL

Example
curl -X "PATCH" "https://incidents.betterstack.com/api/v3/policies/456" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{ "name": "New name" }'