---
type: api
title: Manually assign entities to a watchlist
description: Assigns the provided entities to the specified watchlist using a "manual" source label.
url: https://www.elastic.co/docs/api/doc/kibana-serverless/operation/operation-assignwatchlistentities
resource: https://www.elastic.co/docs/api/doc/kibana-serverless/operation/operation-assignwatchlistentities
products:
  - Kibana
---

# Manually assign entities to a watchlist

Authentication: required

Availability: Preview since 9.4

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

## Paths

- `POST` `/api/entity_analytics/watchlists/{watchlist_id}/entities/assign`
- `POST` `/s/{space_id}/api/entity_analytics/watchlists/{watchlist_id}/entities/assign`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
- `watchlist_id` (string) — required
  The ID of the watchlist to add entities to
  Example: `high-risk-vendors`

## Description

Assigns the provided entities to the specified watchlist using a "manual" source label.
The entities must already exist in the entity store.

If an entity is already on the watchlist, no new document is created — the "manual" label
is added to its existing source labels instead.

## Request body

`application/json`

- `euids` (string[]) — required
  The EUIDs of the entities to assign

## Response

Assignment successful

`application/json`

- `failed` (integer)
  Number of entities that failed to process
- `items` (object[])
  - `error` (string)
    Error message if the entity failed to process
  - `euid` (string)
    The EUID of the entity
  - `status` (enum)
    Values: `success`, `failure`, `not_found`
- `not_found` (integer)
  Number of entities not found in the entity store
- `successful` (integer)
  Number of entities successfully assigned
- `total` (integer)
  Total number of entities processed
## Code examples

#### Console

```console
POST kbn:/api/entity_analytics/watchlists/high-risk-vendors/entities/assign
{
  "euids": [
    "user:john.doe",
    "host:web-01"
  ]
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/entity_analytics/watchlists/high-risk-vendors/entities/assign" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "euids": [
      "user:john.doe",
      "host:web-01"
    ]
  }'
```

## Response examples

#### Successful assignment of two entities

`application/json`

```json
{
  "failed": 0,
  "items": [
    {
      "euid": "user:john.doe",
      "status": "success"
    },
    {
      "euid": "host:web-01",
      "status": "not_found"
    }
  ],
  "not_found": 1,
  "successful": 1,
  "total": 2
}
```

