---
type: api
title: "Delete all case comments and alerts"
description: "Deletes all comments and alerts from a case. 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-deletecasecommentsdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/4904/api/kibana/v8/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 find cases API. All non-ASCII characters must be URL encoded.
  Example: `9c235210-6834-11ea-a78c-6ffb38a34414`

## Description

Deletes all comments and alerts from a case. 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 -X DELETE "${KIBANA_URL}/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/comments" \
  -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
}
```

