---
type: api
title: "Update an existing watchlist"
description: "Updates the name, description, risk modifier, or managed status of an existing entity analytics watchlist. Optionally also sets its rule-based data sources in the same request"
url: https://www.elastic.co/elastic/docs-builder/docs/5112/api/kibana-serverless/operation/operation-updatewatchlist
resource: https://www.elastic.co/elastic/docs-builder/docs/5112/api/kibana-serverless/operation/operation-updatewatchlist
products:
  - Kibana
---

# Update an existing watchlist

Authentication: required

Availability: Preview

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

## Paths

- `PUT` `/api/entity_analytics/watchlists/{id}`
- `PUT` `/s/{space_id}/api/entity_analytics/watchlists/{id}`

#### 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.
- `id` (string · max length: 256) — required
  The ID of the watchlist to update

## Description

Updates the name, description, risk modifier, or managed status of an existing entity analytics watchlist. Optionally also sets its rule-based data sources in the same request

## Request body

`application/json`

- `description` (string · max length: 1000) — optional
  Description of the watchlist
- `entitySources` (object[] · max items: 2) — optional
  The rule-based data sources (entity store or index) the watchlist should have after the update, at most one of each type. Omit it to leave the data sources as they are; an empty array removes them. A watchlist that is not managed can have only one rule-based source in this array; its integration sources are not counted and are not changed. An entity store source requires a non-empty `queryRule`. An index source requires Elasticsearch `read` privileges on its `indexPattern` (and encrypted saved objects to be configured on self-managed deployments), and accepts a `range`; `range` is ignored for entity store sources. Managed data sources are not changed.
  - `enabled` (boolean) — optional
  - `identifierField` (string · max length: 256) — optional
    Field used to query the entity store for index-type sources
  - `indexPattern` (string · max length: 1000) — optional
  - `name` (string · max length: 256) — required
  - `queryRule` (string · max length: 4096) — optional
    KQL query. For an index source, it filters the documents read from the index pattern. For an entity store source, it filters the entity store and is required.
  - `range` (object) — optional
    Defines the lookback period for filtering source data by timestamp.
    - `end` (string · max length: 256) — required
      End of the lookback period (date math or ISO string, e.g. "now")
    - `start` (string · max length: 256) — required
      Start of the lookback period (date math or ISO string, e.g. "now-10d")
  - `type` (enum) — required
    Values: `index`, `store`
- `managed` (boolean) — optional
  Indicates if the watchlist is managed by the system
- `name` (string · max length: 256) — required
  Unique name of the watchlist
- `riskModifier` (number · min: 0 · max: 2) — required
  Risk score modifier associated with the watchlist

## Responses

#### `200`

Watchlist updated successfully

`application/json`

- `createdAt` (string · format: date-time)
  Timestamp indicating when the watchlist was created
- `description` (string)
  Description of the watchlist
- `entityCount` (number)
  Number of entities in the watchlist
- `entitySourceIds` (string[])
  List of entity source IDs associated with the watchlist
- `hasManualEntities` (boolean)
  Indicates whether the watchlist contains manually assigned entities
- `id` (string)
  The unique ID of the watchlist
- `managed` (boolean)
  Indicates if the watchlist is managed by the system
- `name` (string)
  The name of the watchlist
- `riskModifier` (number)
  Risk score modifier associated with the watchlist
- `updatedAt` (string · format: date-time)
  Timestamp indicating when the watchlist was last updated
#### `409`

Conflict. Another watchlist in the current space already has the new name, the name is reserved for a system watchlist, or a data source name is already used.

`application/json`

- `message` (string)
- `status_code` (integer)
## Code examples

#### Console

```console
PUT kbn:/api/entity_analytics/watchlists/ID
{
  "description": "High risk vendor watchlist",
  "managed": false,
  "name": "High Risk Vendors",
  "riskModifier": 1.5
}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/entity_analytics/watchlists/${ID}" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "High risk vendor watchlist",
    "managed": false,
    "name": "High Risk Vendors",
    "riskModifier": 1.5
  }'
```

## Response examples

#### Updated watchlist

`application/json`

```json
{
  "createdAt": "2026-01-28T12:00:00.000Z",
  "description": "High risk vendor watchlist",
  "id": "watchlist-123",
  "managed": false,
  "name": "High Risk Vendors",
  "riskModifier": 1.5,
  "updatedAt": "2026-02-18T12:00:00.000Z"
}
```

#### Name already used

`application/json`

```json
{
  "message": "A watchlist named \u0022High Risk Vendors\u0022 already exists",
  "status_code": 409
}
```

