Upload from URL
POST /upload-from-url — Infipost Public API
Upload a file from an existing URL.
curl --request POST \
--url 'https://api.infipost.asia/public/v1/upload-from-url' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/image.png"
}'Authorization
Authorizationstring · headerrequiredWorkspace API key or OAuth access token. Send the token directly without a Bearer prefix.
Body
urlstringrequiredURL of the file to upload
adjustbooleanAdjust the file to the platforms' limits after the upload: videos are scaled to a 1080 px short side (long side at most 1920 px) and re-encoded to H.264 MP4 with AAC audio, images larger than that are scaled down. Runs in the background, poll GET /media/{id}/status for the result. Defaults to false.
Response
File uploaded successfully
{
"id": "e639003b-f727-4a1e-87bd-74a2c48ae41e",
"name": "image.png",
"path": "https://uploads.postiz.com/image.png",
"organizationId": "85460a39-6329-4cf4-a252-187ce89a3480",
"createdAt": "2024-12-14T08:18:54.274Z",
"updatedAt": "2024-12-14T08:18:54.274Z"
}idstringUnique file ID
namestringFile name
pathstringFile URL
organizationIdstringcreatedAtstringupdatedAtstringstatusstring"processing" while an upload with adjust set to true is being adjusted, otherwise "ready"
"ready""processing"Fetch a remote URL and store the result as a Infipost media asset. Useful when your media already lives on a CDN or external storage and you don't want to round-trip it through your client.
Requirements for the source URL
- Must be reachable from the Infipost backend (publicly resolvable HTTPS, no auth required).
- Detected MIME type must be in the allowlist documented on Upload File.
- Infipost performs an SSRF-safe fetch, private IP ranges, link-local addresses, and
localhostare rejected. Self-hosted deployments on a trusted private network can disable this withDISABLE_SSRF_PROTECTION.
Example
curl -X POST "https://api.infipost.asia/public/v1/upload-from-url" \
-H "Authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/photo.jpg"}'
Response shape matches Upload File.
Add "adjust": true to the body to adjust the file to the platforms' limits after the upload. It works the same as on Upload File.
When to prefer multipart upload
If your source URLs are slow or unreliable, the round-trip through Infipost can fail or take a long time. For best results:
- Cache stable, fast HTTPS source URLs (S3, R2, Cloudflare Images, etc.).
- For one-off uploads, pre-download the file locally and POST it to
/public/v1/uploadinstead. - Don't link to signed URLs that may expire before Infipost fetches them.
See Uploads troubleshooting for common failure modes.