## Delete an attachment

**delete** `/v1/attachments/{attachment}`

Deletes one received attachment from what Linq stores, and normally its copy at the provider; it does not unsend the message, the customer's device keeps its copy, and the provider keeps its own copy of the message text.

The attachment is removed wherever it appears in your account, and its
download then answers `404 attachment_not_found`. The stored bytes are
removed shortly after the `204`; a download already streaming may finish.
The channel's copy is then deleted, normally within minutes. That is
possible only while the channel's id for the file lasts, 7 days after
it arrived: a file older than that, one whose number or account has
since left this service, one whose content retention removed before your delete,
one whose id another received file still shares past those 7 days, or
one the channel has not confirmed deleted by then is left to the
channel's own retention.
The message that carried it stays, with its caption and filename, until
the message itself is deleted. An attachment on an incoming message whose
first event to you is still being delivered answers
`409 awaiting_first_delivery`,
and a chat momentarily busy `409 content_deletion_busy`, each with
`Retry-After`; nothing is recorded against the Idempotency-Key for a
`409`. Deleting an attachment already deleted answers `204`
again, under a new Idempotency-Key. Idempotency-Key is required; reusing it
for a different deletion answers `409 idempotency_conflict`.

### Path Parameters

- `attachment: string`

### Header Parameters

- `"Idempotency-Key": string`

### Example

```http
curl https://whatsapp.messages.api.linqapp.com/v1/attachments/$ATTACHMENT \
    -X DELETE \
    -H "Authorization: Bearer $LINQ_WHATSAPP_API_KEY"
```
