---
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/4493/api/doc/kibana/v8/operation/operation-createendpointlist
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/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`

## 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.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Responses

#### `200`

Successful response

`application/json`

One of:
- **{ created_at, created_by, description, … }**
  - `_version` (string)
  - `created_at` (string · format: date-time)
  - `created_by` (string)
  - `description` (string)
  - `id` (string · format: nonempty · min length: 1)
    A string that does not contain only whitespace characters
  - `immutable` (boolean)
  - `list_id` (string · format: nonempty · min length: 1)
    A string that does not contain only whitespace characters
  - `meta` (object)
  - `name` (string)
  - `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.
    Values: `agnostic`, `single`
  - `os_types` (enum[])
    Values: `linux`, `macos`, `windows`
  - `tags` (string[])
  - `tie_breaker_id` (string)
  - `type` (enum)
    Values: `detection`, `rule_default`, `endpoint`, `endpoint_trusted_apps`, `endpoint_events`, `endpoint_host_isolation_exceptions`, `endpoint_blocklists`
  - `updated_at` (string · format: date-time)
  - `updated_by` (string)
  - `version` (integer · min: 1)
- **object**
#### `400`

Invalid input data

`application/json`

One of:
- **{ error, statusCode }**
  - `error` (string)
  - `message` (string)
  - `statusCode` (integer)
- **{ status_code }**
  - `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 kbn:/api/endpoint_list
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/endpoint_list" \
  -H "Authorization: ApiKey ${API_KEY}"
```

