1. Media
swonkie.dev
  • Introduction
  • Quick Start
  • Changelog
  • Social Networks
    • Facebook
    • Instagram
    • LinkedIn
    • TikTok
    • Threads
  • Profiles
    • My Profiles
      GET
    • Competitors
      GET
  • Insights
    • Getting Started
    • My Profile Insights
      GET
    • My Profile Insights Posts
      GET
    • Competitor Insights
      GET
    • Competitor Insights Posts
      GET
  • Posts
    • Getting Started
    • List Posts
      GET
    • Get a Post
      GET
    • Create a Post
      POST
    • Update a Post
      PUT
    • Validate a Post
      GET
    • Delete a Post
      DELETE
    • Change Post Stage
      PATCH
  • Labels
    • Getting Started
    • List Labels
    • Create a Label
  • Media
    • Get a Media
      GET
    • Create a Media
      POST
    • Upload File to Media
      PUT
    • Confirm Uploaded Media
      PATCH
    • Delete a Media
      DELETE
  • Examples
    • Publish
Back to Home
Back to Home
Login
  1. Media

Delete a Media

DELETE
/media/{mediaId}
Deletes a media file from your workspace's media library. This action is permanent and cannot be undone. The media file and all its associated data (preview, metadata) will be removed from storage.
Important: The media must belong to your workspace, otherwise a 404 error will be returned. Media files that are currently being used in active posts can still be deleted, but this may affect those posts depending on whether they've already been published. Published posts will retain the media on social networks, but the reference in your system will be lost.

Notes#

This action is permanent and cannot be undone.
The media must belong to your workspace, otherwise a 404 error will be returned.
Deleting media that is currently used in posts (especially scheduled or published posts) may cause issues - ensure media is not needed before deletion.
The actual file is removed from storage, along with any generated previews/thumbnails.
If media has already been published to social networks, deleting it from your library will not remove it from those platforms.
Consider archiving media instead of deleting if you might need it in the future (though archiving is not currently available via the API).

Request

Path Params

Header Params

Responses

🟢200
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request DELETE 'https://api.swonkie.dev/v2/media/TWVkaWFJZDk4NzY1NDMyMQ' \
--header 'X-API-ID: {{apiId}}' \
--header 'X-API-KEY: {{apiKey}}'
Response Response Example
{
    "success": true,
    "message": "Media deleted successfully"
}
Modified at 2026-03-11 19:13:36
Previous
Confirm Uploaded Media
Next
Examples
Built with