Upload from URL
POST/:workspace/media/remote/initiate
Downloads a file from a remote URL into the media library.
The URL is checked before the download starts (with a HEAD request, falling back to a ranged GET): the file must be reachable, its Content-Type must be resolvable and among the MIME types allowed by your instance, and — when the remote server advertises a Content-Length — that size must not exceed the maximum for its MIME type.
The download then runs either synchronously or in the background, decided against a fixed 10 MB threshold (this is a separate, hard-coded value and is not affected by MIXPOST_CHUNKED_UPLOAD_THRESHOLD):
- Files whose
Content-Lengthis under 10 MB — and any file whoseContent-Lengththe remote server does not report, regardless of its actual size — are downloaded synchronously, and the response returns the media immediately withstatus: completed. - Everything else is queued for background download and returns
status: pendingwith adownload_id; pollGET /{workspace}/media/remote/{downloadId}/statusfor the result.
Request
Responses
- 200
- 401
- 403
- 404
- 422
This endpoint always responds with 200 — a failed synchronous download is reported as status: failed in the body rather than as an HTTP error status.
Note that the media object returned here has a different, richer shape than the one returned by the other media endpoints: it carries extra descriptive fields such as source_url, credit_url, author, source and alt_text, and it has no created_at.
The bearer token is missing, malformed, unknown, or expired.
The token is valid, but the user it belongs to may not perform this action:
- they are not a member of the
{workspace}in the path; or - their workspace role is too low for this endpoint (write routes require Admin or Member); or
- for
/panelendpoints, they are not a platform administrator.
The host application that Mixpost is installed into can also deny access to Mixpost as a whole, which produces the same response.
The {workspace} UUID in the path does not match any workspace.
The url failed validation — it is not a valid or reachable URL, or the remote file is not accessible or has a MIME type that is not allowed — or your workspace's media-upload limit denied the upload. A limit denial returns the usual errors.limit entry plus an extra top-level limit object describing the limit.