## Delete an upload

**delete** `/v1/media/{upload_ref}`

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

After the `204` the `upload_ref` no longer resolves: a send or template
naming it is refused with `422 upload_ref_not_found`. The stored bytes are
removed shortly after; a copy uploaded to the channel is removed once a
send of it is confirmed delivered, and otherwise when the channel expires
it (up to 30 days). While a template, a carousel or an unfinished send
still uses the upload, the delete answers `409 upload_in_use`, with no
wait. While the upload is momentarily busy it answers
`409 content_deletion_busy` with `Retry-After`; nothing is recorded
against the Idempotency-Key for a `409`. Deleting an
upload 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

- `upload_ref: string`

### Header Parameters

- `"Idempotency-Key": string`

### Example

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