---
type: api
title: Bulk unacknowledge alert episodes
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-alerting-v2-alerts-bulk-unack
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-alerting-v2-alerts-bulk-unack
products:
  - Kibana
---

# Bulk unacknowledge alert episodes

Availability: 9.5+

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/alerting/v2/alerts/_bulk_unack`
- `POST` `/s/{space_id}/api/alerting/v2/alerts/_bulk_unack`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Create the same action for multiple alert episodes in a single request.<br/><br/>[Required authorization] Route required privileges: manage_alerting-v2-alerts.

## Request Body

`application/json`

- `items` ([] object · min: 1 · max: 100) — required
  List of 1 to 100 unack actions to create, each for a different `alert_id`.
  - `alert_id` (string · min: 1 · max: 150) — required
    Identifier of the alert to apply the action to.

## Responses

#### `200`

Returns the number of created actions and per-item errors for actions that were not created.

`application/json`

- `affected_count` (integer · min: 0 · max: 9007199254740991)
  Number of resources the operation successfully touched.
- `errors` ([] object)
  Errors encountered during the operation.
  - `error` (object)
    - `code` (string)
      Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
    - `details` (map string to object)
      Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
    - `message` (string)
      A readable explanation of the error. The wording can change without notice. Do not parse this field.
  - `id` (string)
    The identifier of the resource that failed.
#### `400`

Indicates an invalid schema or parameters.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
#### `401`

Indicates the request was not authenticated.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
#### `403`

Indicates the user does not have the required privileges to perform the request.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
#### `500`

Indicates an unexpected server-side error.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
#### `503`

Indicates the alerting engine is disabled by the `alerting:v2:enabled` advanced setting.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
## Code Examples

#### Console

```console
POST /api/alerting/v2/alerts/_bulk_unack
{
  "items": [
    {
      "alert_id": "episode-1"
    },
    {
      "alert_id": "episode-2"
    }
  ]
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/alerting/v2/alerts/_bulk_unack" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {
      "alert_id": "episode-1"
    },
    {
      "alert_id": "episode-2"
    }
  ]
}'
```

## Response Examples

#### All actions created

```json
{
  "affected_count": 2,
  "errors": []
}
```

#### Items list is empty

```json
{
  "code": "BAD_REQUEST",
  "details": {
    "errors": {
      "items": [
        "At least one action must be provided"
      ]
    }
  },
  "error": "Bad Request",
  "message": "items: At least one action must be provided"
}
```

#### Request was not authenticated

```json
{
  "code": "UNAUTHORIZED",
  "error": "Unauthorized",
  "message": "Authentication required to access this API."
}
```

#### Caller lacks required privileges

```json
{
  "code": "FORBIDDEN",
  "error": "Forbidden",
  "message": "The current user does not have the required privileges for this request."
}
```

#### Unexpected server-side error

```json
{
  "code": "INTERNAL_SERVER_ERROR",
  "error": "Internal Server Error",
  "message": "An unexpected error occurred."
}
```

#### Alerting V2 is disabled

```json
{
  "code": "ALERTING_DISABLED",
  "error": "Service Unavailable",
  "message": "Alerting is disabled."
}
```

