---
type: api
title: Update an exception list
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-updateexceptionlist
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-updateexceptionlist
products:
  - Kibana
---

# Update an exception list

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

## Paths

- `PUT` `/api/exception_lists`
- `PUT` `/s/{space_id}/api/exception_lists`

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

## Description

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

Update an exception list using the `id` or `list_id` field.

## Request Body

`application/json`

Exception list's properties

- `_version` (string) — optional
  The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.
- `description` (string) — required
  Describes the exception list.
- `id` (string · min: 1) — optional
  Exception list's identifier.
- `list_id` (string · min: 1) — optional
  The exception list's human-readable string identifier.

For endpoint artifacts, use one of the following values:

* `endpoint_list`: [Elastic Endpoint exception list](https://www.elastic.co/docs/solutions/security/detect-and-alert/add-manage-exceptions)
* `endpoint_trusted_apps`: [Trusted applications list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/trusted-applications)
* `endpoint_trusted_devices`: [Trusted devices list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/trusted-devices)
* `endpoint_event_filters`: [Event filters list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/event-filters)
* `endpoint_host_isolation_exceptions`: [Host isolation exceptions list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/host-isolation-exceptions)
* `endpoint_blocklists`: [Blocklists list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/blocklist)
- `meta` (object) — optional
  Placeholder for metadata about the list container.
- `name` (string) — required
  The name of the exception list.
- `namespace_type` (enum) — optional
  Determines whether the exception container is available in all Kibana spaces or just the space
in which it is created, where:

- `single`: Only available in the Kibana space in which it is created.
- `agnostic`: Available in all Kibana spaces.

For endpoint artifacts, the `namespace_type` must always be `agnostic`. Space awareness for endpoint artifacts is enforced based on Elastic Defend policy assignments.
  Values: `agnostic`, `single`
- `os_types` ([] object) — optional
  Use this field to specify the operating system. Only enter one value.
  Values: `linux`, `macos`, `windows`
- `tags` ([] object) — optional
  String array containing words and phrases to help categorize exception containers.
- `type` (enum) — required
  The type of exception list to be created. Different list types may denote where they can be utilized.
  Values: `detection`, `rule_default`, `endpoint`, `endpoint_trusted_apps`, `endpoint_trusted_devices`, `endpoint_events`, `endpoint_host_isolation_exceptions`, `endpoint_blocklists`
- `version` (integer · min: 1) — optional
  The document version, automatically increasd on updates.

## Responses

#### `200`

Successful response

`application/json`

- `_version` (string)
  The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.
- `created_at` (string)
  Autogenerated date of object creation.
- `created_by` (string)
  Autogenerated value - user that created object.
- `description` (string)
  Describes the exception list.
- `id` (string · min: 1)
  Exception list's identifier.
- `immutable` (boolean)
- `list_id` (string · min: 1)
  The exception list's human-readable string identifier.

For endpoint artifacts, use one of the following values:

* `endpoint_list`: [Elastic Endpoint exception list](https://www.elastic.co/docs/solutions/security/detect-and-alert/add-manage-exceptions)
* `endpoint_trusted_apps`: [Trusted applications list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/trusted-applications)
* `endpoint_trusted_devices`: [Trusted devices list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/trusted-devices)
* `endpoint_event_filters`: [Event filters list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/event-filters)
* `endpoint_host_isolation_exceptions`: [Host isolation exceptions list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/host-isolation-exceptions)
* `endpoint_blocklists`: [Blocklists list](https://www.elastic.co/docs/solutions/security/manage-elastic-defend/blocklist)
- `meta` (object)
  Placeholder for metadata about the list container.
- `name` (string)
  The name of the exception list.
- `namespace_type` (enum)
  Determines whether the exception container is available in all Kibana spaces or just the space
in which it is created, where:

- `single`: Only available in the Kibana space in which it is created.
- `agnostic`: Available in all Kibana spaces.

For endpoint artifacts, the `namespace_type` must always be `agnostic`. Space awareness for endpoint artifacts is enforced based on Elastic Defend policy assignments.
  Values: `agnostic`, `single`
- `os_types` ([] object)
  Use this field to specify the operating system. Only enter one value.
  Values: `linux`, `macos`, `windows`
- `tags` ([] object)
  String array containing words and phrases to help categorize exception containers.
- `tie_breaker_id` (string)
  Field used in search to ensure all containers are sorted and returned correctly.
- `type` (enum)
  The type of exception list to be created. Different list types may denote where they can be utilized.
  Values: `detection`, `rule_default`, `endpoint`, `endpoint_trusted_apps`, `endpoint_trusted_devices`, `endpoint_events`, `endpoint_host_isolation_exceptions`, `endpoint_blocklists`
- `updated_at` (string)
  Autogenerated date of last object update.
- `updated_by` (string)
  Autogenerated value - user that last updated object.
- `version` (integer · min: 1)
  The document version, automatically increasd on updates.
#### `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`

Exception list 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
PUT /api/exception_lists
{
  "description": "Different description",
  "list_id": "simple_list",
  "name": "Updated exception list name",
  "os_types": [
    "linux"
  ],
  "tags": [
    "draft",
    "malware"
  ],
  "type": "detection"
}
```

#### curl

```curl
curl -X PUT "https://{kibana_url}/api/exception_lists" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "Different description",
  "list_id": "simple_list",
  "name": "Updated exception list name",
  "os_types": [
    "linux"
  ],
  "tags": [
    "draft",
    "malware"
  ],
  "type": "detection"
}'
```

## Response Examples

#### Simple list

```json
{
  "_version": "WzExLDFd",
  "created_at": "2025-01-07T20:43:55.264Z",
  "created_by": "elastic",
  "description": "Different description",
  "id": "fa7f545f-191b-4d32-b1f0-c7cd62a79e55",
  "immutable": false,
  "list_id": "simple_list",
  "name": "Updated exception list name",
  "namespace_type": "single",
  "os_types": [],
  "tags": [
    "draft malware"
  ],
  "tie_breaker_id": "319fe983-acdd-4806-b6c4-3098eae9392f",
  "type": "detection",
  "updated_at": "2025-01-07T21:32:03.726Z",
  "updated_by": "elastic",
  "version": 2
}
```

#### Bad

```json
{
  "error": "Bad Request",
  "message": "[request body]: list_id: Expected string, received number",
  "statusCode": 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 [PUT /api/exception_lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
  "statusCode": 403
}
```

#### Not found

```json
{
  "message\u0022": "exception list id: \u0022foo\u0022 does not exist",
  "status_code\u0022": 404
}
```

#### Server error

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

