Get an escalation policy

Get an escalation policy, the steps that decide who is alerted about an incident and when.

GET https://incidents.betterstack.com/api/v5/escalation-policies/{id}
id string required

The ID of the escalation policy to get.

team_id string

Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.

Authorization string required

Bearer $TOKEN

200 OK
{
  "data": {
    "id": "123456789",
    "type": "escalation_policy",
    "attributes": {
      "name": "Standard Escalation Policy",
      "repeat_count": 3,
      "repeat_delay": 1800,
      "escalation_policy_group_id": "123456",
      "fallback_escalation_policy_id": "456789",
      "incident_token": "s3cr3t-placeholder",
      "steps": [
        {
          "type": "escalation",
          "wait_before": 0,
          "severity_id": "12345",
          "step_members": [
            {
              "type": "current_on_call"
            }
          ]
        },
        {
          "type": "escalation",
          "wait_before": 600,
          "severity_id": "12345",
          "step_members": [
            {
              "type": "entire_team"
            }
          ]
        }
      ],
      "team_id": "t123",
      "team_name": "Test team"
    }
  }
}

Returns the escalation policy.

id string

The ID of the escalation policy.

type string

Always escalation_policy.

name string

Policy name.

repeat_count integer

How many times the whole policy repeats if nobody acknowledges the incident.

repeat_delay integer

Seconds until the steps repeat.

escalation_policy_group_id string or null

The ID of the escalation policy group this policy is in, or null when it's in none.

fallback_escalation_policy_id string or null

Escalation policy to escalate to after these steps and repeats run out. Must belong to the same organization.

incident_token string

The secret token in the link to the policy's incident report form, used to open incidents on this policy.

steps array of objects

Ordered escalation steps. An update with steps replaces the whole list. An empty list makes a silent policy that only collects incidents. Every step has a type, a wait set by wait_before or by wait_until_time and wait_until_timezone, and the keys its type uses.

steps[].type string

The step type.
Valid values:
escalation: Notifies people or integrations.
time_branching: Acts when the incident happens in a time window, and otherwise continues with the next step.
metadata_branching: Acts when the incident's metadata matches a value, and otherwise continues with the next step.
instructions: Posts instructions into the incident timeline.
resolve_remove: Resolves or removes the incident.

steps[].wait_before integer

How long the step waits after the previous step, in seconds, from 0 to 691200, which is 8 days. Defaults to 0. Leave it out when the step waits until a time of day with wait_until_time.

steps[].wait_until_time string

The time of day the step runs, in HH:MM format, instead of waiting wait_before. Requires wait_until_timezone. Responses show it in place of wait_before on such steps.

steps[].wait_until_timezone string

The time zone of wait_until_time, as a time zone name such as London or Eastern Time (US & Canada).

steps[].wait_until_days array of strings

The days on which wait_until_time applies, out of mon, tue, wed, thu, fri, sat and sun. Defaults to every day.

steps[].severity_id string

The ID of the severity that sets how the step's members are notified. Required on escalation steps. Get the severity ID via List severities.

steps[].step_members array of objects

Who or what the step notifies, at least one member. Required on escalation steps. Each member has a type, plus an id, email or metadata_key depending on the type.

steps[].step_members[].type string

The member type. current_on_call notifies whoever is on call, and entire_team everyone in the team. user notifies one person, policy runs another escalation policy, incident_metadata notifies the people or integrations the incident's metadata names under metadata_key, and ai_sre starts an AI SRE investigation. A member can also be one integration, with type webhook, email_integration, slack_integration, linear_integration, jira_integration, halo_psa_integration, microsoft_teams_integration, pagerduty_integration, zapier_webhook, zoom_integration or google_meet_integration. Or it can be every integration of one kind, with type all_slack_integrations, all_linear_integrations, all_jira_integrations, all_microsoft_teams_integrations, all_zapier_integrations, all_pagerduty_integrations, all_webhook_integrations, all_email_integrations, all_splunk_on_call_integrations, all_incident_io_integrations, all_zoom_integrations or all_google_meet_integrations.

steps[].step_members[].id string

The ID of the member's target. Required for user unless email is set, and for policy, ai_sre and every type that notifies one integration. A user member is u123 or their e-mail, and responses return u123. A current_on_call member accepts the ID of an on-call schedule to notify instead of your team's default schedule. An entire_team member accepts another team in the organization, as its ID such as t123. Responses return it the same way. Both come back without an ID when they use the policy's own team. Get a user's ID via List team members, and a team's ID via List teams.

steps[].step_members[].email string

The e-mail of a user member, instead of its id.

steps[].step_members[].metadata_key string

For an incident_metadata member, the incident metadata key that says who to notify. The member notifies the users, teams, on-call schedules, escalation policies and integrations stored under that key.

steps[].timezone string

The time zone of the time window. Required on time_branching steps.

steps[].days array of strings

The days on which the time window applies, out of mon, tue, wed, thu, fri, sat and sun. Used on time_branching steps and defaults to every day.

steps[].time_from string

Start of the time window, in HH:MM format. Required on time_branching steps.

steps[].time_to string

End of the time window, in HH:MM format. Required on time_branching steps.

steps[].metadata_key string

The incident metadata key the step checks. Required on metadata_branching steps.

steps[].metadata_values array of objects

The metadata values that match, at least one. Required on metadata_branching steps. Each is {type: "String", value}, {type: "no_value"} or a catalog item reference. no_value matches when the key is missing or blank.

steps[].metadata_values[].type string

String, no_value, or a catalog item's type, which is one of User, Team, EscalationPolicy, OnCallSchedule, Monitor, SlackIntegration, LinearIntegration, JiraIntegration, MicrosoftTeamsIntegration, ZapierZap, OutgoingWebhook, PagerDutyIntegration or Source. no_value matches when the incident's metadata doesn't have the key or the key is empty.

steps[].metadata_values[].value string

The text of a String value.

steps[].metadata_values[].item_id string

The catalog item's ID. For a user it's u123 or their e-mail. For a team it's t123, and for any other item it's the item's own ID. Responses return users and teams in this form. Get a user's ID via List team members, and a team's ID via List teams.

steps[].metadata_values[].name string

The catalog item's name. An item can also be found by its name instead of item_id.

steps[].metadata_values[].email string

A User item's e-mail, returned for a User. A user can also be found by e-mail.

steps[].action_type string

What the step does. Required on resolve_remove steps, which accept only resolving or removing. On branching steps, the action applies when the incident matches. Defaults to running another policy when you set escalation_policy_id or policy_metadata_key, and to stopping otherwise.
Valid values:
escalate_to_policy: Runs the escalation policy in escalation_policy_id or policy_metadata_key and stops this policy.
resolve_incident: Resolves the incident and stops this policy.
remove_incident: Removes the incident for good and stops this policy.
do_not_escalate: Stops this policy.

steps[].escalation_policy_id string or null

The ID of another escalation policy in your organization to run when the incident matches. Used on time_branching and metadata_branching steps. Can't be combined with policy_metadata_key.

steps[].policy_metadata_key string or null

A key in the incident's metadata that holds the escalation policy to run when the incident matches, instead of escalation_policy_id. Used on time_branching and metadata_branching steps. If the key is missing or holds no policy, the policy stops.

steps[].instructions_comment string

The instructions posted as a comment into the incident timeline. Supports Markdown, checkboxes like - [ ] Step 1, and values from the incident's metadata as {key}, such as {server_region}. Required on instructions steps.

steps[].instructions_reminder_enabled boolean

Whether to post a reminder periodically until every checkbox in the instructions is checked. Defaults to false.

steps[].instructions_reminder_interval_hours integer

How often the reminder is posted, in hours, on instructions steps with instructions_reminder_enabled on. At least 1, and 4 by default.

team_id string

Team that owns this policy, such as t123.

team_name string

Name of the team that owns this policy.

Example cURL

Get an escalation policy
curl --request GET \
  --url https://incidents.betterstack.com/api/v5/escalation-policies/123 \
  --header "Authorization: Bearer $TOKEN"