List all escalation policies

Returns a list of existing escalation policies.

GET https://betteruptime.com/api/v2/policies

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "123",
      "type": "policy",
      "attributes": {
        "name": "Policy - Branching",
        "repeat_count": 3,
        "repeat_delay": 60,
        "incident_token": "vZpYuaRYvLa6t2yqRqHTmEVKu",
        "steps": [
          {
            "type": "time_branching",
            "wait_before": 0,
            "urgency_id": null,
            "timezone": "Prague",
            "days": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri"
            ],
            "time_from": "00:00",
            "time_to": "00:00",
            "policy_id": 456
          },
          {
            "type": "time_branching",
            "wait_before": 0,
            "urgency_id": null,
            "timezone": "Prague",
            "days": [
              "sat",
              "sun"
            ],
            "time_from": "00:00",
            "time_to": "00:00",
            "policy_id": 457
          }
        ]
      }
    },
    {
      "data": {
        "id": "456",
        "type": "policy",
        "attributes": {
          "name": "Policy A",
          "repeat_count": 5,
          "repeat_delay": 0,
          "incident_token": "8nEiLj2gfqjfQRK6vzkFuGC25"
        },
        "steps": [
          {
            "type": "escalation",
            "wait_before": 0,
            "urgency_id": 12345,
            "step_members": [
              {
                "type": "all_slack_integrations"
              },
              {
                "type": "current_on_call"
              }
            ]
          }
        ]
      }
    }
  ],
  "pagination": {
    "first": "https://betteruptime.com/api/v2/policies?page=1",
    "last": "https://betteruptime.com/api/v2/policies?page=1",
    "prev": null,
    "next": null
  }
}

Example cURL

curl --request GET \
  --url https://betteruptime.com/api/v2/policies \
  --header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!