Create an escalation policy

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

POST https://betteruptime.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

curl -X "POST" "https://betteruptime.com/api/v2/policies/" \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{ "name": "Test" }'
Copied!