Get an escalation policy
Get an escalation policy, the steps that decide who is alerted about an incident and when.
The ID of the escalation policy to get.
Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.
Bearer $TOKEN
{
"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"
}
}
}
{
"errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
{
"errors": "Resource type escalation_policy with id = 123 was not found"
}
Returns the escalation policy.
The API token is missing or invalid.
Your role doesn't allow viewing this, or the token can't be used for this API.
The escalation policy doesn't exist, or the token can't access it. Get the IDs via List escalation policies.
The ID of the escalation policy.
Always escalation_policy.
Policy name.
How many times the whole policy repeats if nobody acknowledges the incident.
Seconds until the steps repeat.
The ID of the escalation policy group this policy is in, or null when it's in none.
Escalation policy to escalate to after these steps and repeats run out. Must belong to the same organization.
The secret token in the link to the policy's incident report form, used to open incidents on this policy.
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.
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.
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.
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.
The time zone of wait_until_time, as a time zone name such as London or Eastern Time (US & Canada).
The days on which wait_until_time applies, out of mon, tue, wed, thu, fri, sat and sun. Defaults to every day.
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.
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.
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.
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.
The e-mail of a user member, instead of its id.
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.
The time zone of the time window. Required on time_branching steps.
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.
Start of the time window, in HH:MM format. Required on time_branching steps.
End of the time window, in HH:MM format. Required on time_branching steps.
The incident metadata key the step checks. Required on metadata_branching steps.
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.
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.
The text of a String value.
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.
The catalog item's name. An item can also be found by its name instead of item_id.
A User item's e-mail, returned for a User. A user can also be found by e-mail.
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.
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.
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.
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.
Whether to post a reminder periodically until every checkbox in the instructions is checked. Defaults to false.
How often the reminder is posted, in hours, on instructions steps with instructions_reminder_enabled on. At least 1, and 4 by default.
Team that owns this policy, such as t123.
Name of the team that owns this policy.
Example cURL