# Escalate incident

This will escalate an ongoing incident to another team member, a team, different escalation policy, or the whole organization.

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v3/incidents/{incident_id}/escalate"
method = "POST"

[[path_param]]
name = "incident_id"
description = "The ID of the incident you want to get"
required = true
type = "string"

[[body_param]]
name = "escalation_type"
description = "Who should we escalate this incident to?  \nPossible values: `User`, `Team`, `Schedule`, `Policy`, and `Organization`"
required = true
type = "string"

[[body_param]]
name = "user_email"
description = "Define which team member to escalate to.  \nEither `user_email` or `user_id` required when escalating to `User`."
required = false
type = "string"

[[body_param]]
name = "user_id"
description = "Define which team member to escalate to.  \nEither `user_email` or `user_id` required when escalating to `User`."
required = false
type = "integer"

[[body_param]]
name = "team_name"
description = "Define which team to escalate to.  \nEither `team_name` or `team_id` required when escalating to `Team`."
required = false
type = "string"

[[body_param]]
name = "team_id"
description = "Define which team to escalate to.  \nEither `team_name` or `team_id` required when escalating to `Team`."
required = false
type = "integer"

[[body_param]]
name = "schedule_id"
description = "Define which on-call calendar to escalate to. Required when escalating to `Schedule`."
required = false
type = "integer"

[[body_param]]
name = "policy_id"
description = "Define which escalation policy to escalate to. Required when escalating to `Policy`."
required = false
type = "integer"

[[body_param]]
name = "call"
description = "Should we call?  \nCan be used when escalating to `User`, `Team`, `Schedule`, or `Organization`."
required = false
type = "boolean"

[[body_param]]
name = "sms"
description = "Should we send an SMS?  \nCan be used when escalating to `User`, `Team`, `Schedule`, or `Organization`."
required = false
type = "boolean"

[[body_param]]
name = "email"
description = "Should we send an email?  \nCan be used when escalating to `User`, `Team`, `Schedule`, or `Organization`."
required = false
type = "boolean"

[[body_param]]
name = "push"
description = "Should we send a push notification?  \nCan be used when escalating to `User`, `Team`, `Schedule`, or `Organization`."
required = false
type = "boolean"

[[body_param]]
name = "critical_alert"
description = "Should we send a critical push notification that ignores the mute switch and Do not Disturb mode?  \nCan be used when escalating to `User`, `Team`, `Schedule`, or `Organization`."
required = false
type = "boolean"

[[body_param]]
name = "metadata"
description = "An object with metadata keys as the object keys and arrays of metadata values as object values. See the [metadata API response params](/docs/uptime/api/metadata-api-response-params/#metadatavalue) page for details about metadata value attributes."
required = false
type = "object"

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

[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returned when an incident was escalated successfully'''
body = '''{
  "data": {
    "id": "123456789",
    "type": "incident",
    "attributes": {
      "name": "uptime homepage",
      "url": "https://uptime.betterstack.com/",
      "http_method": "get",
      "cause": "Status 500",
      "incident_group_id": null,
      "started_at": "2020-03-09T17:37:56.662Z",
      "acknowledged_at": "2020-03-09T18:37:56.662Z",
      "acknowledged_by": "Elon Musk",
      "resolved_at": null,
      "resolved_by": null,
      "response_content": "\n404 Not Found\n\nNot Found\nThe requested URL /fail was not found on this server.\n",
      "response_options": "{}",
      "regions": ["us", "eu", "as", "au"],
      "response_url": null,
      "screenshot_url": null,
      "origin_url": null,
      "escalation_policy_id": null,
      "call": true,
      "sms": true,
      "email": true,
      "push": true
    },
    "relationships": {
      "monitor": {
        "data": {
          "id": "2",
          "type": "monitor"
        }
      }
    }
  }
}'''

[[response]]
status = 409
description = '''Returned when an incident was already resolved'''
body = '''{
  "errors": "Cannot escalate a resolved incident."
}'''
[/responses]

#### Example cURL

[code-tabs]
```shell
[label User]
curl --request POST \
  --url https://uptime.betterstack.com/api/v3/incidents/123456/escalate \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "escalation_type": "User",
    "user_email": "mail@example.com",
    "email": true,
    "push": true
  }'
```
```shell
[label Team]
curl --request POST \
  --url https://uptime.betterstack.com/api/v3/incidents/123456/escalate \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "escalation_type": "Team",
    "team_name": "My Team",
    "email": true,
    "push": true
  }'
```
```shell
[label Schedule]
curl --request POST \
  --url https://uptime.betterstack.com/api/v3/incidents/123456/escalate \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "escalation_type": "Schedule",
    "schedule_id": 123,
    "call": true,
    "push": true,
    "critical_alert": true
  }'
```
```shell
[label Policy]
curl --request POST \
  --url https://uptime.betterstack.com/api/v3/incidents/123456/escalate \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "escalation_type": "Policy",
    "policy_id": 123
  }'
```
```shell
[label Organization]
curl --request POST \
  --url https://uptime.betterstack.com/api/v3/incidents/123456/escalate \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "escalation_type": "Organization",
    "push": true
  }'
```
```shell
[label With metadata]
curl --request POST \
  --url https://uptime.betterstack.com/api/v3/incidents/123456/escalate \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "escalation_type": "User",
    "user_email": "mail@example.com",
    "email": true,
    "push": true,
    "metadata": {
      "Affected Services": [
        {
          "value": "Homepage"
        },
        {
          "value": "Login"
        }
      ],
      "On-call Calendar": [
        {
          "type": "Schedule",
          "name": "Primary calendar"
        }
      ]
    }
  }'
```
[/code-tabs]

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