Media
Upload Media
Re-host an image, video, or PDF for use in a post. Provide either url or file_base64, not both. Requires a paid Premium or Lifetime plan.
POST /v1/media/upload re-hosts an image, video or PDF on LinkedMash and returns a stable public URL to use as media_url on a draft or a schedule call. It takes either a remote url to fetch and copy, or file_base64 with a file_name for raw bytes — one or the other, not both.
Re-hosting is the recommended path even when you already have a URL. A scheduled post publishes hours or days after it is created, and an asset that has expired or moved by then publishes as a post with a broken attachment.
post/v1/media/upload
Request
- Base URL: https://api.linkedmash.com
- URL: https://api.linkedmash.com/v1/media/upload
- Auth: one of:
- OAuth 2 (client credentials, token URL https://api.linkedmash.com/auth/oauth/token, scopes: content:write)
- HTTP bearer
- API key in header linkedmash-api-key
Request body
Example request
{
"url": "https://example.com/assets/diagram.png",
"mime_type": "image/png"
}Response
Successful response.
Changes
No recorded changes to this operation across all 1 revision of this API.