---
title: "Create an exception list"
method: POST
path: "/api/exception_lists"
tags: ["Security Exceptions API"]
---

# Create an exception list

`POST /api/exception_lists`

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

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/exception_lists</span></div>

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

An exception list groups exception items and can be associated with detection rules. You can assign exception lists to multiple detection rules.
> info
> All exception items added to the same list are evaluated using `OR` logic. That is, if any of the items in a list evaluate to `true`, the exception prevents the rule from generating an alert. Likewise, `OR` logic is used for evaluating exceptions when more than one exception list is assigned to a rule. To use the `AND` operator, you can define multiple clauses (`entries`) in a single exception item.

## Request body

- object
  - `description` string, required — Describes the exception list.
  - `list_id` string, nonempty — The exception list's human-readable string identifier. For endpoint artifacts, use one of the following values: * `endpoint_list`: Elastic Endpoint exceptions list * `endpoint_trusted_apps`: Trusted applications list * `endpoint_trusted_devices`: Trusted devices list * `endpoint_event_filters`: Event filters list * `endpoint_host_isolation_exceptions`: Host isolation exceptions list * `endpoint_blocklists`: Blocklist
  - `meta` SecurityExceptionsAPIExceptionListMeta — Placeholder for metadata about the list container.
  - `name` string, required — The name of the exception list.
  - `namespace_type` 'agnostic' | 'single' — 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.
  - `os_types` SecurityExceptionsAPIExceptionListOsType[] — Use this field to specify the operating system. Only enter one value.
  - `tags` string[] — String array containing words and phrases to help categorize exception containers.
  - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The type of exception list to be created. Different list types may denote where they can be utilized.
  - `version` integer — The document version, automatically increasd on updates.

## Response `200`

Successful response

- SecurityExceptionsAPIExceptionList
  - `_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, date-time, required — Autogenerated date of object creation.
  - `created_by` string, required — Autogenerated value - user that created object.
  - `description` string, required — Describes the exception list.
  - `id` string, nonempty, required — Exception list's identifier.
  - `immutable` boolean, required
  - `list_id` string, nonempty, required — The exception list's human-readable string identifier. For endpoint artifacts, use one of the following values: * `endpoint_list`: Elastic Endpoint exceptions list * `endpoint_trusted_apps`: Trusted applications list * `endpoint_trusted_devices`: Trusted devices list * `endpoint_event_filters`: Event filters list * `endpoint_host_isolation_exceptions`: Host isolation exceptions list * `endpoint_blocklists`: Blocklist
  - `meta` SecurityExceptionsAPIExceptionListMeta — Placeholder for metadata about the list container.
  - `name` string, required — The name of the exception list.
  - `namespace_type` 'agnostic' | 'single', required — 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.
  - `os_types` SecurityExceptionsAPIExceptionListOsType[] — Use this field to specify the operating system. Only enter one value.
  - `tags` string[] — String array containing words and phrases to help categorize exception containers.
  - `tie_breaker_id` string, required — Field used in search to ensure all containers are sorted and returned correctly.
  - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The type of exception list to be created. Different list types may denote where they can be utilized.
  - `updated_at` string, date-time, required — Autogenerated date of last object update.
  - `updated_by` string, required — Autogenerated value - user that last updated object.
  - `version` integer, required — The document version, automatically increasd on updates.

## Other responses

- `400` — Invalid input data response
- `401` — Unsuccessful authentication response
- `403` — Not enough privileges response
- `409` — Exception list already exists response
- `500` — Internal server error response

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
