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

Generic Error. This response indicates an issue with the request.

`application/json`

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

#### Console

```console
DELETE kbn:/api/security_ai_assistant/current_user/conversations
{}
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/security_ai_assistant/current_user/conversations" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Response examples

#### 200

`application/json`

```json
{
  "success": true
}
```

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

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

