Create escalation policy

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

POST https://uptime.betterstack.com/api/v3/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": "456789",
    "type": "policy",
    "attributes": {
      "name": "Standard Escalation Policy",
      "repeat_count": 3,
      "repeat_delay": 1800,
      "incident_token": "AND63ccyT18oKcSFnbJfxlFi1",
      "policy_group_id": null,
      "team_name": "Test Team",
      "steps": [
        {
          "type": "escalation",
          "urgency_id": 123456,
          "step_members": [
            {
              "type": "current_on_call"
            }
          ],
          "wait_before": 0
        },
        {
          "type": "escalation",
          "urgency_id": 123456,
          "step_members": [
            {
              "type": "entire_team"
            }
          ],
          "wait_before": 600
        }
      ]
    }
  }
}

Example cURL

Escalation policy Branching Instructions
curl -X "POST" "https://uptime.betterstack.com/api/v2/policies/"
-H "Authorization: Bearer $TOKEN"  
-H 'Content-Type: application/json; charset=utf-8'   
-d '{
  "name": "Standard Escalation Policy",
  "repeat_count": 3,
  "repeat_delay": 1800,
  "steps": [
    {
      "type": "escalation",
      "wait_before": 0,
      "urgency_id": "'$SEVERITY_ID'",
      "step_members": [
        { "type": "current_on_call" }
      ]
    },
    {
      "type": "escalation",
      "wait_before": 600,
      "urgency_id": "'$SEVERITY_ID'",
      "step_members": [
        { "type": "entire_team" }
      ]
    }
  ]
}'
curl -X "POST" "https://uptime.betterstack.com/api/v2/policies/" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
  "name": "Business Hours Branching",
  "steps": [
    {
      "type": "time_branching",
      "wait_before": 0,
      "timezone": "America/New_York",
      "days": ["mon", "tue", "wed", "thu", "fri"],
      "time_from": "09:00",
      "time_to": "17:00",
      "policy_metadata_key": "business_hours_policy"
    },
    {
      "type": "escalation",
      "wait_before": 300,
      "urgency_id": "'$SEVERITY_ID'",
      "step_members": [
        { "type": "current_on_call" },
        { "type": "all_slack_integrations" }
      ]
    }
  ]
}'
curl -X "POST" "https://uptime.betterstack.com/api/v2/policies/" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
  "name": "Policy with Instructions and Todo list",
  "steps": [
    {
      "type": "instructions",
      "wait_before": 0,
      "instructions_comment": "IMMEDIATE ACTIONS:\n1. Check system status at status.example.com\n2. Verify in monitoring dashboard\n3. Check #incidents Slack channel\n4. If database-related, run: kubectl get pods -n production",
      "instructions_reminder_enabled": false
    },
    {
      "type": "escalation",
      "wait_before": 0,
      "urgency_id": "'$SEVERITY_ID'",
      "step_members": [
        { "type": "current_on_call" },
        { "type": "all_slack_integrations" }
      ]
    },
    {
      "type": "instructions",
      "wait_before": 900,
      "instructions_comment": "ESCALATION REQUIRED:\n- [] Page backup on-call\n- [] Start incident bridge: dial 1-800-XXX-XXXX, code: 12345#\n- [] Update status page\n- [] Notify stakeholders via #incident-comms",
      "instructions_reminder_enabled": true,
      "instructions_reminder_interval_hours": 2
    },
    {
      "type": "escalation",
      "wait_before": 300,
      "urgency_id": "'$SEVERITY_ID'",
      "step_members": [
        { "type": "entire_team" },
        { "type": "user", "email": "manager@example.com" }
      ]
    }
  ]
}'