---
type: api
title: Delete a case comment or alert
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-deletecasecommentdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-deletecasecommentdefaultspace
products:
  - Kibana
---

# Delete a case comment or alert

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

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#basicauth)

#### Path Parameters

- `caseId` (string)
  The identifier for the case. To retrieve case IDs, use the find cases API. All non-ASCII characters must be URL encoded.
- `commentId` (string)
  The identifier for the comment. To retrieve comment IDs, use the get case or find cases APIs.

## Description

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

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.

## 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 /api/cases/{caseId}/comments/{commentId}
```

#### curl

```curl
curl -X DELETE "https://{kibana_url}/api/cases/{caseId}/comments/{commentId}" \
  -H "kbn-xsrf: true"
```

