---
type: api
title: Patch a value list item
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-patchlistitem
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-patchlistitem
products:
  - Kibana
---

# Patch a value list item

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

## Paths

- `PATCH` `/api/lists/items`
- `PATCH` `/s/{space_id}/api/lists/items`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/authentication#apikeyauth)

## Description

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

Update specific fields of an existing value list item using the item `id`.

## Request Body

`application/json`

Value list item's properties

- `_version` (string) — optional
  The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version.
- `id` (string · min: 1) — required
  Value list item's identifier.
- `meta` (object) — optional
  Placeholder for metadata about the value list item.
- `refresh` (enum) — optional
  Determines when changes made by the request are made visible to search.
  Values: `true`, `false`, `wait_for`
- `value` (string · min: 1) — optional
  The value used to evaluate exceptions.

## Responses

#### `200`

Successful response

`application/json`

- `_version` (string)
  The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version.
- `@timestamp` (string)
- `created_at` (string)
  Autogenerated date of object creation.
- `created_by` (string)
  Autogenerated value - user that created object.
- `id` (string · min: 1)
  Value list item's identifier.
- `list_id` (string · min: 1)
  Value list's identifier.
- `meta` (object)
  Placeholder for metadata about the value list item.
- `tie_breaker_id` (string)
  Field used in search to ensure all containers are sorted and returned correctly.
- `type` (enum)
  Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:

- `keyword`: Many ECS fields are Elasticsearch keywords
- `ip`: IP addresses
- `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation)
  Values: `binary`, `boolean`, `byte`, `date`, `date_nanos`, `date_range`, `double`, `double_range`, `float`, `float_range`, `geo_point`, `geo_shape`, `half_float`, `integer`, `integer_range`, `ip`, `ip_range`, `keyword`, `long`, `long_range`, `shape`, `short`, `text`
- `updated_at` (string)
  Autogenerated date of last object update.
- `updated_by` (string)
  Autogenerated value - user that last updated object.
- `value` (string · min: 1)
  The value used to evaluate exceptions.
#### `400`

Invalid input data response

`application/json`

One of:
- **PlatformErrorResponse**
  - `error` (string)
  - `message` (string)
  - `statusCode` (integer)
- **SiemErrorResponse**
  - `message` (string)
  - `status_code` (integer)
#### `401`

Unsuccessful authentication response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
#### `403`

Not enough privileges response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
#### `404`

List item not found response

`application/json`

- `message` (string)
- `status_code` (integer)
#### `500`

Internal server error response

`application/json`

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

#### Console

```console
PATCH /api/lists/items
{
  "id": "pd1WRJQBs4HAK3VQeHFI",
  "value": "255.255.255.255"
}
```

#### curl

```curl
curl -X PATCH "https://{kibana_url}/api/lists/items" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "pd1WRJQBs4HAK3VQeHFI",
  "value": "255.255.255.255"
}'
```

## Response Examples

#### Ip item

```json
{
  "_version": "WzE5LDFd",
  "@timestamp": "2025-01-08T05:15:05.159Z",
  "created_at": "2025-01-08T05:15:05.159Z",
  "created_by": "elastic",
  "id": "pd1WRJQBs4HAK3VQeHFI",
  "list_id": "ip_list",
  "tie_breaker_id": "eee41dc7-1666-4876-982f-8b0f7b59eca3",
  "type": "ip",
  "updated_at": "2025-01-08T05:23:37.602Z",
  "updated_by": "elastic",
  "value": "255.255.255.255"
}
```

#### Bad

```json
{
  "message": "{\u0022took\u0022:15,\u0022timed_out\u0022:false,\u0022total\u0022:1,\u0022updated\u0022:0,\u0022deleted\u0022:0,\u0022batches\u0022:1,\u0022version_conflicts\u0022:0,\u0022noops\u0022:0,\u0022retries\u0022:{\u0022bulk\u0022:0,\u0022search\u0022:0},\u0022throttled_millis\u0022:0,\u0022requests_per_second\u0022:-1,\u0022throttled_until_millis\u0022:0,\u0022failures\u0022:[{\u0022index\u0022:\u0022.ds-.items-default-2025.01.09-000001\u0022,\u0022id\u0022:\u0022ip_item\u0022,\u0022cause\u0022:{\u0022type\u0022:\u0022document_parsing_exception\u0022,\u0022reason\u0022:\u0022[1:107] failed to parse field [ip] of type [ip] in document with id ip_item. Preview of fields value: 2\u0022,\u0022caused_by\u0022:{\u0022type\u0022:\u0022illegal_argument_exception\u0022,\u0022reason\u0022:\u00222 is not an IP string literal.\u0022}},\u0022status\u0022:400}]}",
  "status_code": 400
}
```

#### Unauthorized

```json
{
  "error": "Unauthorized",
  "message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
  "statusCode": 401
}
```

#### Forbidden

```json
{
  "error": "Forbidden",
  "message": "API [PATCH /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
  "statusCode": 403
}
```

#### Not found

```json
{
  "message": "list item id: \\\u0022foo\\\u0022 not found",
  "status_code": 404
}
```

#### Server error

```json
{
  "message": "Internal Server Error",
  "status_code": 500
}
```

