---
type: api
title: Bulk acknowledge alerts
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-post-alerting-v2-alerts-bulk-ack
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-post-alerting-v2-alerts-bulk-ack
products:
  - Kibana
---

# Bulk acknowledge alerts

Availability: Experimental

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

## Paths

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

## Description

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

Create the same action for multiple alerts in a single request.

## Required authorization

- Privileges: `manage_alerting-v2-alerts`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `items` (object[] · min items: 1 · max items: 100) — required
  List of 1 to 100 ack actions to create, each for a different `alert_id`.
  - `alert_id` (string · min length: 1 · max length: 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 kbn:/api/alerting/v2/alerts/_bulk_ack
{
  "items": [
    {
      "alert_id": "alert-1"
    },
    {
      "alert_id": "alert-2"
    }
  ]
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/alerting/v2/alerts/_bulk_ack" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "alert_id": "alert-1"
      },
      {
        "alert_id": "alert-2"
      }
    ]
  }'
```

## Response examples

#### One action created, one alert not found

```json
{
  "affected_count": 1,
  "errors": [
    {
      "error": {
        "code": "ALERT_NOT_FOUND",
        "message": "Alert with alert_id [alert-2] not found"
      },
      "id": "alert-2"
    }
  ]
}
```

#### 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."
}
```

