---
title: "Delete all case attachments"
method: DELETE
path: "/api/cases/{caseId}/attachments"
tags: ["cases"]
---

# Delete all case attachments

`DELETE /api/cases/{caseId}/attachments`

## Request

- Base URL: `https://localhost:5601`
- URL: `https://localhost:5601/api/cases/{caseId}/attachments`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP basic

**Spaces method and path for this operation:**

<div><span class="operation-verb delete">delete</span>&nbsp;<span class="operation-path">/s/{space_id}/api/cases/{caseId}/attachments</span></div>

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

Deletes all attachments from a case. Attached files 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 case.

## Path parameters

- `caseId` string, required

## Headers

- `kbn-xsrf` string, required

## Response `204`

Indicates a successful call.

## Other responses

- `401`: Authorization information is missing or invalid.
- `403`: You don't have the required privileges for this case.
- `404`: The case doesn't exist or has no attachments.

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) - [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/elastic/apis/kibana-apis/revisions/31b9a1dac8bf?raw)
