---
title: "Assign and unassign users from detection alerts"
method: POST
path: "/api/detection_engine/signals/assignees"
tags: ["Security Detections API"]
---

# Assign and unassign users from detection alerts

`POST /api/detection_engine/signals/assignees`

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/detection_engine/signals/assignees</span></div>

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

Assign users to detection alerts, and unassign them from alerts.
> info
> You cannot add and remove the same assignee in the same request.

## Request body

- SecurityDetectionsAPISetAlertAssigneesBody
  - `assignees` SecurityDetectionsAPIAlertAssignees, required
    - `add` string[], required
    - `remove` string[], required
  - `ids` string[], required — A list of alerts `id`s.

## Response `200`

Indicates a successful call. The body matches an Elasticsearch update-by-query response
(for example `took`, `updated`, `failures`).

- object — Elasticsearch update by query response

## Other responses

- `400` — Invalid input data response
- `401` — Unsuccessful authentication response
- `403` — Not enough privileges response
- `500` — Internal server error response

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
