---
title: "Delete attachment"
method: DELETE
path: "/attachments/{id}"
tags: ["Attachment"]
---

# Delete attachment

`DELETE /attachments/{id}`

Delete an attachment by id.

Deleting an attachment moves the attachment to the trash, where it can be restored later. To permanently delete an attachment (or "purge" it),
the endpoint must be called on a **trashed** attachment with the following param `purge=true`.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to view the container of the attachment.
Permission to delete attachments in the space.
Permission to administer the space (if attempting to purge).

## Path parameters

- `id` integer, required

## Query parameters

- `purge` boolean

## Response `204`

Returned if the attachment was successfully deleted.

## Other responses

- `400` — Returned if an invalid request is provided.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.
- `404` — Returned if: - The provided attachment does not exist - The user does not have permissions to view the container of the attachment - The user does not have the needed permissions to delete an attachment in the space

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api-v2/revisions/c4bd1ed570f2/schema)
