---
type: api
title: Deletes a single Knowledge Base Entry using the `id` field
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-deleteknowledgebaseentry
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-deleteknowledgebaseentry
products:
  - Kibana
---

# Deletes a single Knowledge Base Entry using the `id` field

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

## Paths

- `DELETE` `/api/security_ai_assistant/knowledge_base/entries/{id}`
- `DELETE` `/s/{space_id}/api/security_ai_assistant/knowledge_base/entries/{id}`

#### Path parameters

- `id` (string · format: nonempty · min length: 1) — required
  The unique identifier (`id`) of the Knowledge Base Entry to delete.
  Example: `12345`

## Description

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

Delete a Knowledge Base Entry by its unique `id`.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Responses

#### `200`

Successful request returning the `id` of the deleted Knowledge Base Entry.

`application/json`

- `id` (string · format: nonempty · min length: 1)
  A string that does not contain only whitespace characters.
#### `400`

A generic error occurred, such as an invalid `id` or the entry not being found.

`application/json`

- `error` (string)
  Error type or category.
- `message` (string)
  Detailed error message.
- `statusCode` (number)
  HTTP status code of the error.
## Code examples

#### Console

```console
DELETE kbn:/api/security_ai_assistant/knowledge_base/entries/12345
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/security_ai_assistant/knowledge_base/entries/12345" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### 200

```json
{
  "id": "12345",
  "message": "Knowledge Base Entry successfully deleted."
}
```

#### 400

```json
{
  "error": "Not Found",
  "message": "No Knowledge Base Entry found with the provided \u0060id\u0060."
}
```

