Delete an uploaded media file
Requires scope: `publish:write`. Deletes a previously uploaded file by its `r2_key`.
Authorization
ApiKey A personal API key created in the dashboard (Starter, Pro, and Team plans).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X DELETE "https://example.com/media/uploads" \ -H "Content-Type: application/json" \ -d '{ "platform": "instagram", "r2_key": "instagram/4021/uuid.jpg" }'Upload media (Facebook, Instagram, Pinterest, TikTok, Threads, Discord, Slack, Telegram, Tumblr, X, Mastodon, Bluesky) POST
Requires scope: `publish:write`. Uploads base64-encoded media to storage and returns an `r2_key` to reference from a post's `post_contents` metadata. `platform` selects the size/type limits. For X, Mastodon, and Bluesky the image is minted into the platform's native handle at publish time under each targeted account, so the same `r2_key` works correctly even when a post targets more than one account on that platform.
Upload an X (Twitter) image POST
Requires scope: `publish:write`. Uploads a base64 image to X and returns a `media_id` for use in a post's metadata. X media IDs are scoped to the uploading account — pass `social_account_id` when the user has more than one X account connected, or the media is minted under the oldest connected account and is invalid for the others.