---
type: api
title: Delete an entity
description: Delete a single entity record from the Entity Store. The entity is immediately removed from the latest index.<br/><br/>[Required authorization] Route required privileges: securitySolution.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-delete-security-entity-store-entities
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-delete-security-entity-store-entities
products:
  - Kibana
---

# Delete an entity

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

## Paths

- `DELETE` `/api/security/entity_store/entities/`

## Description

Delete a single entity record from the Entity Store. The entity is immediately removed from the latest index.

## Required authorization

- Privileges: `securitySolution`

## 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>`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `entityId` (string) — required
  The identifier of the entity to delete.

## Responses

#### `200`

Indicates the entity was successfully deleted.

`application/json`

#### `404`

Entity not found.

`application/json`

## Code examples

#### Console

```console
DELETE kbn://api/security/entity_store/entities/
{
  "entityId": "host:web-server-prod-01"
}
```

#### curl

```curl
curl -X DELETE -H "kbn-xsrf: true" -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"entityId":"host:web-server-prod-01"}' \
  "${KIBANA_URL}/api/security/entity_store/entities/"
```

## Response examples

#### Entity deleted

The entity was found and successfully removed from the latest index.

```json
{
  "deleted": true
}
```

#### Entity not found

No entity with the specified identifier exists in the Entity Store.

```json
{
  "error": "Not Found",
  "message": "Entity ID \u0027host:web-server-prod-01\u0027 not found",
  "statusCode": 404
}
```

