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

# Create an Elastic Endpoint rule exception list

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

## Paths

- `POST` `/api/endpoint_list`
- `POST` `/s/{space_id}/api/endpoint_list`

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

## Description

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

Create the exception list for Elastic Endpoint rule exceptions. When you create the exception list, it will have a `list_id` of `endpoint_list`. If the Elastic Endpoint exception list already exists, your request will return an empty response.

## Responses

#### `200`

Successful response

`application/json`

One of:
- **ExceptionList**
  - `_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 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` (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`, `endpoint_custom_yara_signatures`
  - `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.
- **object**
#### `400`

Invalid input data

`application/json`

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

Unsuccessful authentication

`application/json`

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

Insufficient privileges

`application/json`

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

Internal server error

`application/json`

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

#### Console

```console
POST /api/endpoint_list
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/endpoint_list"
```

## Response Examples

#### Endpoint exception list already exists (empty response)

```json
{}
```

#### Endpoint exception list created

```json
{
  "created_at": "2025-01-01T00:00:00.000Z",
  "created_by": "elastic",
  "description": "Endpoint Security Exception List",
  "id": "2e23a8c4-ef7e-4c10-adfa-3eae4e4b4b8b",
  "immutable": false,
  "list_id": "endpoint_list",
  "name": "Endpoint Security Exception List",
  "namespace_type": "agnostic",
  "os_types": [],
  "tags": [],
  "tie_breaker_id": "e3c5a8e0-5b6a-4b4b-8b3a-2e23a8c4ef7e",
  "type": "endpoint",
  "updated_at": "2025-01-01T00:00:00.000Z",
  "updated_by": "elastic",
  "version": 1
}
```

#### Bad

```json
{
  "error": "Bad Request",
  "message": "[request body]: expected value of type [object] but got [undefined]",
  "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 [POST /api/endpoint_list] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
  "statusCode": 403
}
```

#### Server error

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

