Skip to main content
DELETE
Delete a media file
Needs media:delete, and a role in the workspace that can delete media. See Permissions.
Deletes the file and its copies, and takes it out of every post that holds it. What was already published stays on the networks. This can’t be undone. A file an upcoming post still needs isn’t deleted: a post that is scheduled, queued, waiting for approval or repeating. The answer is 422, and its message names up to 3 of those posts. Let them publish first, or take the file off them, then delete it. A file still being made (is_processing) isn’t deleted either; if it fails to generate, it goes on its own.

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

media_id
integer
required

The file's id.

Response

The file was deleted.

An error answer. Every one has message, in plain words; some add an error code and fields of their own.

message
string
required

What went wrong and what to do about it.

error
string

A code a few errors add, such as rate_limited. See Handle errors.