---
title: "Assign an alert to a user"
method: POST
path: "/api/alerting/v2/alerts/{id}/_assign"
tags: ["alerting-v2"]
---

# Assign an alert to a user

`POST /api/alerting/v2/alerts/{id}/_assign`

## Request

- Base URL: `https://localhost:5601`
- URL: `https://localhost:5601/api/alerting/v2/alerts/{id}/_assign`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP basic

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

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/alerting/v2/alerts/{id}/_assign</span></div>

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

Create an action for a specific alert.<br/><br/>[Required authorization] Route required privileges: manage_alerting-v2-alerts.

## Path parameters

- `id` string, required

## Headers

- `kbn-xsrf` string, required

## Request body

- KibanaHTTPAPIsAlertingNewAssignAlertAction
  - `assignee_uid` string, nullable, required: User profile UID of the assignee, or null to remove the assignee from the alert.

## Response `204`

Indicates the action was created.

## Other responses

- `400`: Indicates an invalid schema or parameters.
- `401`: Indicates the request was not authenticated.
- `403`: Indicates the user does not have the required privileges to perform the request.
- `404`: Indicates the alert was not found.
- `409`: Indicates the alert already carries the requested assignee.
- `500`: Indicates an unexpected server-side error.
- `503`: Indicates the alerting engine is disabled by the `alerting:v2:enabled` advanced setting.

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) - [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/elastic/apis/kibana-apis/revisions/b87131d80c52?raw)
