---
title: "Delete a Discover session"
method: DELETE
path: "/api/discover_sessions/{id}"
tags: ["Discover sessions"]
---

# Delete a Discover session

`DELETE /api/discover_sessions/{id}`

## Request

- Base URL: `https://localhost:5601`
- URL: `https://localhost:5601/api/discover_sessions/{id}`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP basic

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

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

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

Permanently deletes a Discover session by ID.

## Path parameters

- `id` string, required

## Headers

- `kbn-xsrf` string, required

## Response `204`

Deleted

## Other responses

- `403`: Forbidden
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) - [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/elastic/apis/kibana-apis/revisions/b87131d80c52?raw)
