# Delete a media file with the PostEverywhere API **Source:** https://posteverywhere.ai/docs/api/delete-media --- [🤖Connect ChatGPT, Claude or any AI agent to manage your social media end to endConnect your AI agent to manage your social media](https://posteverywhere.ai/agents)DELETE/media/{id} # Delete a media file with the PostEverywhere API If the media is attached to scheduled posts the delete is refused with `409 media_in_use` unless `?force=true`, in which case those pending destinations are cancelled (marked failed with a cancellation note) and `cancelled_post_count` reports how many. Deletion is permanent and frees storage. Fires the `media.deleted` webhook event. Guide: [Media requirements by platform](https://posteverywhere.ai/docs/media-requirements) Copy MarkdownCopy for LLM ## Parameters idstringrequiredMedia UUIDforcebooleanoptionalSet to true to confirm deletion when the media is attached to scheduled posts ## Responses - 200Deleted - 400 - 401 - 402 - 403 - 404 - 409Media attached to scheduled posts — retry with force=true - 429 - 500 ## More in Media - [List media](https://posteverywhere.ai/docs/api/list-media) - [Upload media](https://posteverywhere.ai/docs/api/init-media-upload) - [Import from URL](https://posteverywhere.ai/docs/api/upload-media-from-url) - [Get media](https://posteverywhere.ai/docs/api/get-media) - [Finalise upload](https://posteverywhere.ai/docs/api/complete-media-upload) [← Get media](https://posteverywhere.ai/docs/api/get-media)[Finalise upload →](https://posteverywhere.ai/docs/api/complete-media-upload)[← All endpoints](https://posteverywhere.ai/docs/api/reference)