---
type: api
title: "Delete all case comments and alerts"
description: "Deletes all comments and alerts from a case. The files of any file attachments are also deleted. 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-serverless/operation/operation-deletecasecommentsdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/4904/api/kibana-serverless/operation/operation-deletecasecommentsdefaultspace
products:
  - Kibana
---

# Delete all case comments and alerts

Authentication: required

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

## Paths

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

#### 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 search cases (`_find)` API. All non-ASCII characters must be URL encoded.
  Example: `9c235210-6834-11ea-a78c-6ffb38a34414`

## Description

Deletes all comments and alerts from a case. The files of any file attachments are also deleted. 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
```

#### curl

```curl
curl \
  --request DELETE 'https://localhost:5601/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/comments' \
  --header "Authorization: $API_KEY" \
  --header "kbn-xsrf: true"
```

## Response examples

#### Authorization information is missing or invalid.

`application/json`

```json
{
  "error": "Unauthorized",
  "message": "Unable to authenticate with the provided credentials.",
  "statusCode": 401
}
```

