---
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/4493/api/doc/kibana/v8/operation/operation-setalertsstatus
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/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`

## 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.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Request body

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

`application/json`

One of:
- **{ signal_ids }**
  - `signal_ids` (string[] · format: nonempty · min items: 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`
- **{ query, conflicts, runtime_fields, … }**
  - `conflicts` (enum · default: abort) — optional
    Values: `abort`, `proceed`
  - `query` (object) — required
  - `runtime_fields` (map string to enum · max properties: 100) — 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.
    Map values (enum)
      Values: `keyword`, `long`, `double`, `date`, `ip`, `boolean`, `geo_point`
  - `runtime_mappings` (map string to object · max properties: 100) — 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 (object)
    - `format` (string · max length: 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 length: 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:
- **{ error, statusCode }**
  - `error` (string)
  - `message` (string)
  - `statusCode` (integer)
- **{ status_code }**
  - `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 kbn:/api/detection_engine/signals/status
{
  "signal_ids": [
    "string"
  ],
  "status": "open"
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/detection_engine/signals/status" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "signal_ids": [
      "string"
    ],
    "status": "open"
  }'
```

