---
type: api
title: Assign and unassign users from detection alerts
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-setalertassignees
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-setalertassignees
products:
  - Kibana
---

# Assign and unassign users from detection alerts

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

## Paths

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

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

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

`application/json`

- `assignees` ({}) — required
  - `add` ([] string) — required
  - `remove` ([] string) — required
- `ids` ([] object · min: 1) — required
  A list of alerts ids.

## Responses

#### `200`

Indicates a successful call.

#### `400`

Invalid request.

## Code Examples

#### Console

```console
POST /api/detection_engine/signals/assignees
```

#### curl

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

