> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsyncer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete media

> Remove a media library item and its stored file

## Delete media

Deletes the media record and removes the file from storage. Associations with posts and comments are removed via database cascades.

### Request

<ParamField path="media_id" type="integer" required>
  The media row **`id`** to delete.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X DELETE "https://postsyncer.com/api/v1/media/99" \
    -H "Authorization: Bearer YOUR_API_TOKEN"
  ```
</RequestExample>

### Response

`200` - `{ "message": "Media deleted successfully" }`.

### Errors

`401` · `403` · `404`

See [Media overview](/api-reference/media/overview).
