Delete media
DELETE/media/:id
Permanently delete a media file from your library and its backing storage. This action cannot be undone.
Media attached to published posts
Media already used in published posts stays on the destination platforms (Instagram, X, etc.) even after you delete it from PostEverywhere. This endpoint only removes the file from your workspace's media library and backing storage.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
media_id | string (UUID) | Yes | UUID of the media file to delete. Accepts id as a deprecated alias in the URL path. |
Response Example
200 — Media deleted
{
"data": {
"media_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"deleted": true
},
"error": null,
"meta": {
"request_id": "a1b2c3d4",
"timestamp": "2026-04-12T08:30:00.000Z"
}
}
404 — Media not found
{
"data": null,
"error": {
"message": "Media not found.",
"code": "not_found"
},
"meta": {
"request_id": "e5f6g7h8",
"timestamp": "2026-04-12T08:30:00.000Z"
}
}
409 — Media is in use
{
"data": null,
"error": {
"message": "Cannot delete media that is attached to scheduled posts.",
"code": "media_in_use",
"details": {
"post_ids": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"]
}
},
"meta": {
"request_id": "i9j0k1l2",
"timestamp": "2026-04-12T08:30:00.000Z"
}
}
Request
Responses
- 200
- 401
- 404
- 429
- 500
Media deleted
Missing or invalid API key
Resource not found
Rate limit exceeded
Response Headers
X-RateLimit-Limit
Request limit per window
X-RateLimit-Remaining
Remaining requests in current window
X-RateLimit-Reset
Unix timestamp when the window resets
Retry-After
Seconds to wait before retrying
Internal server error