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

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"
    },
    "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 $TEAM_TOKEN" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{ "name": "Test" }'