# Update escalation policy

Update an existing escalation policy. Send only the parameters you wish to change (eg. `url`).

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v3/policies/{policy_id}"
method = "PATCH"

[[path_param]]
name = "policy_id"
description = "The ID of the escalation policy you want to update"
required = true
type = "integer"

[[body_param]]
name = "name"
description = "The name of this Policy."
required = false
type = "string"

[[body_param]]
name = "repeat_count"
description = "How long in seconds to wait before each repetition."
required = false
type = "integer"

[[body_param]]
name = "repeat_delay"
description = "Incident token that can be used for manually reporting incidents."
required = false
type = "integer"

[[body_param]]
name = "steps"
description = "An array of escalation policy steps. See the [list of escalation policy API parameters](https://betterstack.com/docs/uptime/api/escalation-policies-api-response-params/) for details."
required = false
type = "Array of PolicyStep"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"

[[header]]
name = "Content_Type"
description = "application/json"
required = false
type = "string"
[/endpoint]


[responses]
[[response]]
status = 200
description = '''Returns the updated escalation policy'''
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" }
        ]
      }
    ]
    }
}'''

[/responses]

#### Example cURL 

```shell
[label Example]
curl -X "PATCH" "https://uptime.betterstack.com/api/v3/policies/456" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{ "name": "New name" }'
```

[info]
#### Looking for the details of a specific parameter?
Explore [the list of all escalation policies API parameters](https://betterstack.com/docs/uptime/api/escalation-policies-api-response-params/)
[/info]

