---
type: api
title: Set a detection alert status
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-setalertsstatus
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-setalertsstatus
products:
  - Kibana
---

# Set a detection alert status

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

## Paths

- `POST` `/api/detection_engine/signals/status`
- `POST` `/s/{space_id}/api/detection_engine/signals/status`

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

## Description

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

Set the status of one or more detection alerts.

## Request Body

`application/json`

An object containing desired status and explicit alert ids or a query to select alerts

One of:
- **SetAlertsStatusByIds**
  - `signal_ids` ([] string · min: 1) — required
    List of alert ids. Use field `_id` on alert document or `kibana.alert.uuid`. Note: signals are a deprecated term for alerts.
  - `status` (enum) — required
    Values: `open`, `closed`, `acknowledged`, `in-progress`
- **SetAlertsStatusByQuery**
  - `conflicts` (enum  · default: abort) — optional
    Values: `abort`, `proceed`
  - `query` (object) — required
  - `runtime_fields` (map string to object) — optional
    Optional map of field name to runtime field type. For each entry, a runtime field of the specified type is created reading its value from `_source[fieldName]` and included in the query as `runtime_mappings`. Use this to reference fields stored on the alert `_source` that are not part of the alerts index mapping, for example, custom fields added via data view runtime fields. The combined number of unique field names across `runtime_fields` and `runtime_mappings` must not exceed 100.
  - `runtime_mappings` (map string to object) — optional
    Use this when the query references fields that are not in the alerts index mapping, for example data view runtime fields with a Painless script. The combined number of unique field names across `runtime_fields` and `runtime_mappings` must not exceed 100.
    Map values ({})
    - `format` (string · max: 100) — optional
      Format string for date runtime fields, for example `strict_date_optional_time`.
    - `script` (object) — optional
      Inline Painless script that Elasticsearch evaluates for each alert. Only `source` is accepted. Stored scripts, parameterized scripts (`params`), and non-default `lang` values are not supported. Extra properties are rejected with a 400 so the script is not run with different semantics.
      - `source` (string · max: 10000) — required
        Painless script source to execute.
    - `type` (enum) — required
      The data type for the runtime field type. Determines how the field value is indexed and queried.
      Values: `keyword`, `long`, `double`, `date`, `ip`, `boolean`, `geo_point`
  - `status` (enum) — required
    Values: `open`, `closed`, `acknowledged`, `in-progress`

## Responses

#### `200`

Successful response

`application/json`

Type: `object`

#### `400`

Invalid input data response

`application/json`

One of:
- **PlatformErrorResponse**
  - `error` (string)
  - `message` (string)
  - `statusCode` (integer)
- **SiemErrorResponse**
  - `message` (string)
  - `status_code` (integer)
#### `401`

Unsuccessful authentication response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
#### `500`

Internal server error response

`application/json`

- `message` (string)
- `status_code` (integer)
## Code Examples

#### Console

```console
POST /api/detection_engine/signals/status
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/detection_engine/signals/status"
```

