---
type: api
title: Create a value list
description: Create a new value list.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-createlist
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-createlist
products:
  - Kibana
---

# Create a value list

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

## Paths

- `POST` `/api/lists`

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

## Description

Create a new value list.

## Request Body

`application/json`

Value list's properties

- `description` (string · min: 1) — required
  Describes the value list.
- `id` (string · min: 1) — optional
  Value list's identifier.
- `meta` (object) — optional
  Placeholder for metadata about the value list.
- `name` (string · min: 1) — required
  Value list's name.
- `type` (enum) — required
  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`
- `version` (integer · min: 1 · default: 1) — optional

## 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.
- `description` (string · min: 1)
  Describes the value list.
- `id` (string · min: 1)
  Value list's identifier.
- `immutable` (boolean)
- `meta` (object)
  Placeholder for metadata about the value list.
- `name` (string · min: 1)
  Value list's name.
- `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.
- `version` (integer · min: 1)
  The document version number.
#### `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)
#### `409`

List already exists response

`application/json`

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

Internal server error response

`application/json`

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

#### Console

```console
POST /api/lists
{
  "description": "This list describes bad internet ips",
  "id": "ip_list",
  "name": "Simple list with ips",
  "type": "ip"
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/lists" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "This list describes bad internet ips",
  "id": "ip_list",
  "name": "Simple list with ips",
  "type": "ip"
}'
```

## Response Examples

#### Ip

```json
{
  "_version": "WzAsMV0=",
  "@timestamp": "2025-01-08T04:47:34.273Z",
  "created_at": "2025-01-08T04:47:34.273Z",
  "created_by": "elastic",
  "description": "This list describes bad internet ips",
  "id": "ip_list",
  "immutable": false,
  "name": "Simple list with ips",
  "tie_breaker_id": "f5508188-b1e9-4e6e-9662-d039a7d89899",
  "type": "ip",
  "updated_at": "2025-01-08T04:47:34.273Z",
  "updated_by": "elastic",
  "version": 1
}
```

#### Ip range

```json
{
  "_version": "WzAsMV0=",
  "@timestamp": "2025-01-09T18:23:52.241Z",
  "created_at": "2025-01-09T18:23:52.241Z",
  "created_by": "elastic",
  "description": "This list has ip ranges",
  "id": "ip_range_list",
  "immutable": false,
  "name": "Simple list with ip ranges",
  "tie_breaker_id": "74aebdaf-601f-4940-b351-155728ff7003",
  "type": "ip_range",
  "updated_at": "2025-01-09T18:23:52.241Z",
  "updated_by": "elastic",
  "version": 1
}
```

#### Keyword

```json
{
  "_version": "WzEsMV0=",
  "@timestamp": "2025-01-09T18:24:55.786Z",
  "created_at": "2025-01-09T18:24:55.786Z",
  "created_by": "elastic",
  "description": "This list describes bad host names",
  "id": "keyword_list",
  "immutable": false,
  "name": "Simple list with a keyword",
  "tie_breaker_id": "f7e7dbaa-daf7-4c9a-a3dc-56643923ef68",
  "type": "keyword",
  "updated_at": "2025-01-09T18:24:55.786Z",
  "updated_by": "elastic",
  "version": 1
}
```

#### Keyword custom format

```json
{
  "_version": "WzIsMV0=",
  "@timestamp": "2025-01-09T18:25:39.604Z",
  "created_at": "2025-01-09T18:25:39.604Z",
  "created_by": "elastic",
  "description": "This parses the first found ipv4 only",
  "id": "keyword_custom_format_list",
  "immutable": false,
  "name": "Simple list with a keyword using a custom format",
  "tie_breaker_id": "8247ae63-b780-47b8-9a89-948b643e9ec2",
  "type": "keyword",
  "updated_at": "2025-01-09T18:25:39.604Z",
  "updated_by": "elastic",
  "version": 1
}
```

#### Not found

```json
{
  "message": "To create a list, the data stream must exist first. Data stream \\\u0022.lists-default\\\u0022 does not exist",
  "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 [POST /api/lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
  "statusCode": 403
}
```

#### Already exists

```json
{
  "message": "list id: \u0022keyword_custom_format_list\u0022 already exists",
  "status_code": 409
}
```

#### Server error

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

