---
type: api
title: Delete conversations
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/operation/operation-deleteallconversations
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/operation/operation-deleteallconversations
products:
  - Kibana
---

# Delete conversations

Authentication: required

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

## Paths

- `DELETE` `/api/security_ai_assistant/current_user/conversations`
- `DELETE` `/s/{space_id}/api/security_ai_assistant/current_user/conversations`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Description

This endpoint allows users to permanently delete all conversations.

## Request body

`application/json`

- `excludedIds` (string[]) — optional
  Optional list of conversation IDs to delete.

## Responses

#### `200`

Indicates a successful call. The conversations were deleted successfully.

`application/json`

- `failures` (string[])
- `success` (boolean)
- `totalDeleted` (number)
#### `400`

Bad Request response.

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
## Code examples

#### curl

```curl
curl \
 --request DELETE 'http://localhost:5601/api/security_ai_assistant/current_user/conversations' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"excludedIds":["abc123"]}'
```

## Request examples

#### Delete all conversations

`application/json`

```json
{
  "excludedIds": [
    "abc123",
    "def456"
  ]
}
```

## Response examples

#### Delete all conversations response200

`application/json`

```json
{
  "failures": [],
  "success": true,
  "totalDeleted": 10
}
```

#### Delete all conversations response400

`application/json`

```json
{
  "error": "Bad Request",
  "message": "Invalid conversation ID",
  "statusCode": 400
}
```

