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

# Assign and unassign users from attack discovery alerts

`POST /api/detection_engine/attacks/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/attacks/assignees</span></div>

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

Assign users to attack discovery alerts, and unassign them from alerts.
Optionally cascade the change to related detection alerts via `kibana.alert.attack_discovery.alert_ids`.
> info
> You cannot add and remove the same assignee in the same request.

## Request body

- SecurityDetectionsAPISetAttacksAssigneesByIds
  - `assignees` SecurityDetectionsAPIAlertAssignees, required
    - `add` string[], required
    - `remove` string[], required
  - `ids` string[], required — A list of alerts `id`s.
  - `update_related_alerts` boolean — When `true`, the change is also applied to detection alerts related to the attacks via `kibana.alert.attack_discovery.alert_ids`.

## Response `200`

Successful response

- object — Elasticsearch update by query response

## Other responses

- `400` — Invalid input data response
- `401` — Unsuccessful authentication 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)
