Media
Bring photos and videos in by URL or upload, then use them in posts.
Posts reference media by id. There are three ways to add a file.
Import from a URL
Section titled “Import from a URL”Best for files already online (your CDN, a shop, a shared Drive link that downloads directly):
curl https://postflow.biz.id/api/v1/media \ -H "Authorization: Bearer $POSTFLOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://cdn.example.com/reel.mp4", "width": 1080, "height": 1920, "durationMs": 21000 }'- The URL must be public
https://; private and local addresses are refused. - The server must answer within 60 seconds, and send
Content-Lengthfor videos. - The type comes from the response’s
Content-Type.
Upload a file
Section titled “Upload a file”Send the bytes as the request body, up to 30 MB for images and 1 GB for videos:
curl "https://postflow.biz.id/api/v1/media/upload?name=menu.jpg" \ -H "Authorization: Bearer $POSTFLOW_API_KEY" \ -H "Content-Type: image/jpeg" \ --data-binary @menu.jpgFor videos add width, height and durationMs to the query, as for imports.
Multipart upload (large or resumable)
Section titled “Multipart upload (large or resumable)”POST /media/uploadswith{ name, mime, size, width?, height?, durationMs? }. You getmediaId,uploadId,partSize(10 MB) andpartCount.- For each part
nfrom 1:PUT /media/uploads/{mediaId}/parts/{n}?uploadId=…with the part’s bytes. Keep eachetag. POST /media/uploads/{mediaId}/completewith{ uploadId, parts: [{ partNumber, etag }] }.
Cancel with /abort. Unfinished uploads don’t show in the library.
What PostFlow measures
Section titled “What PostFlow measures”Images are measured automatically (width and height). Videos can’t be measured on the server, so send their size and length.
Without them, pre-flight can’t check aspect ratio or duration and only warns (media_dimensions_unknown).
| Types | JPEG, PNG, WebP, GIF, MP4, MOV, WebM |
| Size | Images 30 MB, videos 1 GB (lower per platform, see Platforms) |
| Storage | Counted against the plan; 402 PLAN_LIMIT when full |
Library
Section titled “Library”GET /media: newest first, withusedIn(posts using the file); filter bykindor name (q).GET /media/{id}/file: the file itself (?thumb=1for a video’s thumbnail). Theurlfield in responses is the app’s path; with the API, use this endpoint.DELETE /media/{id}: only files no post uses.POST /media/deletedeletes up to 100 and skips used ones.
To crop or convert a photo for a platform, open the post in the app: the composer offers a one-click fix.