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

# Export an exception list

`POST /api/exception_lists/_export`

**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/_export</span></div>

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

Export an exception list and its associated items to an NDJSON file.

## Query parameters

- `id` string, nonempty, required — Exception list's identifier.
- `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
- `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.
- `include_expired_exceptions` 'true' | 'false', required

## Response `200`

Successful response

## Other responses

- `400` — Invalid input data response
- `401` — Unsuccessful authentication response
- `403` — Not enough privileges response
- `404` — Exception list not found 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)
