Skip to content

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.

Best for files already online (your CDN, a shop, a shared Drive link that downloads directly):

Terminal window
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-Length for videos.
  • The type comes from the response’s Content-Type.

Send the bytes as the request body, up to 30 MB for images and 1 GB for videos:

Terminal window
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.jpg

For videos add width, height and durationMs to the query, as for imports.

  1. POST /media/uploads with { name, mime, size, width?, height?, durationMs? }. You get mediaId, uploadId, partSize (10 MB) and partCount.
  2. For each part n from 1: PUT /media/uploads/{mediaId}/parts/{n}?uploadId=… with the part’s bytes. Keep each etag.
  3. POST /media/uploads/{mediaId}/complete with { uploadId, parts: [{ partNumber, etag }] }.

Cancel with /abort. Unfinished uploads don’t show in the library.

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
  • GET /media: newest first, with usedIn (posts using the file); filter by kind or name (q).
  • GET /media/{id}/file: the file itself (?thumb=1 for a video’s thumbnail). The url field in responses is the app’s path; with the API, use this endpoint.
  • DELETE /media/{id}: only files no post uses. POST /media/delete deletes 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.