Explore documentation

Create an escalation policy

Returns either a newly created escalation policy, or validation errors.

POST https://uptime.betterstack.com/api/v2/policies

Headers

Authorization
required string
Content_Type
string

Body parameters

team_name
string
name
required string
repeat_count
integer
repeat_delay
integer
steps
Array of PolicyStep
201

Response body

{
  "data": {
    "id": "456",
    "type": "policy",
    "attributes": {
      "name": "Policy A",
      "repeat_count": 5,
      "repeat_delay": 0,
      "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 "POST" "https://uptime.betterstack.com/api/v2/policies/" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{ "name": "Test" }'