---
title: "Erase an uploaded file and its previews"
method: DELETE
path: "/v1/media/{id}"
tags: ["Media"]
---

# Erase an uploaded file and its previews

`DELETE /v1/media/{id}`

## Request

- Base URL: `https://api.postlake.dev`
- URL: `https://api.postlake.dev/v1/media/{id}`
- Auth: `bearerAuth` (a scheme the document does not define)

Owner-scoped, irreversible erasure. First GET /v1/media/{id}/deletion, then send its snapshot. Blocks drafts, approval requests, queued/scheduled/processing targets, concurrent publication and more than 200 references. Replace/remove their media or cancel/reject those posts first. Terminal social posts remain online, but PostLake previews disappear. No publishing-credit refund. Storage failures retain a retryable deletion receipt. This overrides the minimum retention only at the owner's instruction. Does not erase external URLs or copies held independently by social networks.

## Path parameters

- `id` string, required

## Request body

- object
  - `snapshot` string, required

## Response `200`

Original and stored previews removed; repeated completion returns the same receipt

- object
  - `id` string
  - `deleted` boolean
  - `deletesSocialPosts` boolean
  - `cancelsSchedules` boolean
  - `refundsPublishingCredits` boolean

## Other responses

- `400`: Snapshot is missing or invalid
- `404`: Upload not found in this workspace
- `409`: Referenced by pending work, concurrently publishing, stale snapshot or over 200 references
- `500`: Storage cleanup incomplete; review and retry, not successful erasure

---

[API](https://skmtc.dev/postlake/apis/postlake-api.md) · [All operations](https://skmtc.dev/postlake/apis/postlake-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postlake/apis/postlake-api/revisions/f81060e31f69?raw)
