---
type: api
title: "Delete a case comment or alert"
description: "You must have all privileges for the Cases feature in the Management, Observability, or Security section of the Kibana feature privileges, depending on the owner of the cases you're deleting."
url: https://www.elastic.co/elastic/docs-builder/docs/4904/api/kibana/v8/operation/operation-deletecasecommentdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/4904/api/kibana/v8/operation/operation-deletecasecommentdefaultspace
products:
  - Kibana
---

# Delete a case comment or alert

Authentication: required

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

## Paths

- `DELETE` `/api/cases/{caseId}/comments/{commentId}`
- `DELETE` `/s/{space_id}/api/cases/{caseId}/comments/{commentId}`

#### 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.
- `caseId` (string) — required
  The identifier for the case. To retrieve case IDs, use the find cases API. All non-ASCII characters must be URL encoded.
  Example: `9c235210-6834-11ea-a78c-6ffb38a34414`
- `commentId` (string) — required
  The identifier for the comment. To retrieve comment IDs, use the get case or find cases APIs.
  Example: `71ec1870-725b-11ea-a0b2-c51ea50a58e2`

## Description

You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.

## Header parameters

- `kbn-xsrf` (string) — required
  Cross-site request forgery protection

## Responses

#### `204`

Indicates a successful call.

#### `401`

Authorization information is missing or invalid.

`application/json`

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

#### Console

```console
DELETE kbn:/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/comments/71ec1870-725b-11ea-a0b2-c51ea50a58e2
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/comments/71ec1870-725b-11ea-a0b2-c51ea50a58e2" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### 401

`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": "Unauthorized",
  "message": "string",
  "statusCode": 401
}
```

