POST/media/upload-from-url
Import media from a URL with the PostEverywhere API
Fetches the URL server-side and stores it — no presign/PUT/complete dance. **Images** (JPEG/PNG/GIF/WebP/HEIC/HEIF, max 25 MB) import synchronously: the response `media_id` is ready immediately. **Videos** (MP4 only, max 4 GB) import ASYNCHRONOUSLY: the response returns instantly with `media_status: "uploading"` while the file streams in server-side. Poll `GET /media/{id}` until `media_status` is `ready` (typically seconds), then attach via `media_ids`. If it becomes `failed`, the poll response's `error_message` states exactly why (too large, not actually an MP4, storage quota, source URL died). Oversize videos with a Content-Length return `413` up front; storage quota returns `403 storage_quota_exceeded`. 30 s fetch timeout to first byte, SSRF-guarded including redirects (no localhost/private addresses, `400 invalid_url`). Unreachable or slow URLs return `502`/`504` `fetch_failed`. Consumes the media upload quota.
Guide: Media requirements by platform
This endpoint accepts a JSON request body. See the media guide for a worked example.
Responses
- 200Imported. Images return media_status "ready"; videos return "uploading" — poll `GET /media/{id}` until ready before attaching.
- 400
- 401
- 402
- 403
- 413Downloaded file exceeds 25 MB
- 415Video URL — use the 3-step upload flow instead
- 429
- 500
- 502Source URL unreachable or upstream image service unavailable
- 504Source URL timed out (over 30 s)