> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Update an alert

`PUT https://api.pagerduty.com/incidents/{id}/alerts/{alert_id}`

Resolve an alert or associate an alert with a new parent incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

When a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.

For more information see the [API Concepts Document](https://docs.pagerduty.com/developer/api-concepts#incidents)

Scoped OAuth requires: `incidents.write`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of the resource. |
| `alert_id` | string | yes | The id of the alert to retrieve. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |
| `From` | string (email) | yes | The email address of a valid user associated with the account making the request. |

## Request body (`application/json`)

The parameters of the alert to update.

| Field | Type | Required | Description |
|---|---|---|---|
| `alert` | object | yes |  |
| `alert.status` | string |  | One of: `resolved`, `triggered`. |
| `alert.incident` | object |  |  |
| `alert.incident.id` | string | yes |  |
| `alert.incident.type` | string |  | One of: `incident_reference`. |

Example: Request Example

```json
{
  "alert": {
    "type": "alert",
    "status": "resolved",
    "incident": {
      "id": "PEYSGVF",
      "type": "incident_reference"
    }
  }
}
```

## Response 200

The alert that was updated.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `alert` | object | yes |  |
| `alert.id` | string |  | Read-only. |
| `alert.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `alert.type` | string | yes | The type of object being created. One of: `alert`. Default: `alert`. |
| `alert.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `alert.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `alert.created_at` | string (date-time) |  | The date/time the alert was first triggered. Read-only. |
| `alert.status` | string |  | The current status of the alert. One of: `triggered`, `resolved`. |
| `alert.alert_key` | string |  | The alert's de-duplication key. Read-only. |
| `alert.service` | object |  |  |
| `alert.service.id` | string | yes | Read-only. |
| `alert.service.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `alert.service.type` | string | yes | One of: `service_reference`. |
| `alert.service.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `alert.service.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `alert.first_trigger_log_entry` | object |  |  |
| `alert.first_trigger_log_entry.id` | string | yes | Read-only. |
| `alert.first_trigger_log_entry.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `alert.first_trigger_log_entry.type` | string | yes | One of: `acknowledge_log_entry_reference`, `annotate_log_entry_reference`, `assign_log_entry_reference`, `escalate_log_entry_reference`, `exhaust_escalation_path_log_entry_reference`, `notify_log_entry_reference`, `reach_trigger_limit_log_entry_reference`, `repeat_escalation_path_log_entry_reference`, `resolve_log_entry_reference`, `snooze_log_entry_reference`, `trigger_log_entry_reference`, `unacknowledge_log_entry_reference`. |
| `alert.first_trigger_log_entry.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `alert.first_trigger_log_entry.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `alert.incident` | object |  |  |
| `alert.incident.id` | string | yes | Read-only. |
| `alert.incident.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `alert.incident.type` | string | yes | One of: `incident_reference`. |
| `alert.incident.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `alert.incident.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `alert.suppressed` | boolean |  | Whether or not an alert is suppressed. Suppressed alerts are not created with a parent incident. Read-only. Default: `false`. |
| `alert.severity` | string |  | The magnitude of the problem as reported by the monitoring tool. Read-only. One of: `info`, `warning`, `error`, `critical`. |
| `alert.integration` | object |  |  |
| `alert.integration.id` | string | yes | Read-only. |
| `alert.integration.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `alert.integration.type` | string | yes | One of: `aws_cloudwatch_inbound_integration_reference`, `cloudkick_inbound_integration_reference`, `event_transformer_api_inbound_integration_reference`, `generic_email_inbound_integration_reference`, `generic_events_api_inbound_integration_reference`, `keynote_inbound_integration_reference`, `nagios_inbound_integration_reference`, `pingdom_inbound_integration_reference`, `sql_monitor_inbound_integration_reference`, `events_api_v2_inbound_integration_reference`, `inbound_integration_reference`. |
| `alert.integration.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `alert.integration.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `alert.body` | object |  | A JSON object containing data describing the alert. Read-only. |
| `alert.body.type` | string |  | The type of the body. One of: `alert_body`. |
| `alert.body.contexts` | array of object |  | Contexts to be included with the body such as links to graphs or images. Read-only. |
| `alert.body.contexts[].type` | string | yes | The type of context being attached to the incident. One of: `link`, `image`. |
| `alert.body.contexts[].href` | string |  | The link's target url. |
| `alert.body.contexts[].src` | string |  | The image's source url. |
| `alert.body.contexts[].text` | string |  | The alternate display for an image. |
| `alert.body.details` | object |  | An arbitrary JSON object or string containing any data explaining the nature of the alert. Read-only. |

Example: Request Example

```json
{
  "alert": {
    "type": "alert",
    "status": "resolved",
    "incident": {
      "id": "PEYSGVF",
      "type": "incident_reference"
    },
    "body": {
      "type": "alert_body",
      "contexts": [
        {
          "type": "link"
        }
      ],
      "details": {
        "customKey": "Server is on fire!",
        "customKey2": "Other stuff!"
      }
    }
  }
}
```

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 429

Too many requests have been made, the rate limit has been reached.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
