Postifuse Docs

Media

Upload media

POSThttps://postifuse.com/v1/media

Upload once, from a URL or from a file. The response says, per network, whether the file fits and what to change if not. The original is never changed.

  • Large file: send "upload": true to get a one-time upload_url, valid one hour, to PUT the bytes to
  • "adjust": true: Postifuse makes one version per network that needs it (ratio, length, size, codec) and sends media.ready when they are done
curl --request POST \
  --url 'https://postifuse.com/v1/media' \
  --header 'Authorization: Bearer pf_live_…' \
  --header 'Idempotency-Key: upload-media-1' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://cdn.example.com/reel.mp4"
}'
{
  "id": "med_42",
  "type": "video",
  "duration_s": 42,
  "ratio": "9:16",
  "size_mb": 38,
  "fit": {
    "tiktok": "ok",
    "instagram": "ok",
    "x": {
      "status": "blocked",
      "rule": "x.video.max_duration",
      "fix": "Trim to 140 s or less",
      "adjust": "trim_to_140s"
    }
  }
}

Headers

Authorizationstringrequired

Bearer followed by a workspace key, a profile key or an OAuth token. See authentication.

Example Bearer pf_live_…

Idempotency-Keystringrequired

Any unique string. The same key within 24 h returns the same result and posts nothing twice.

Body application/json

urlstring<uri>

A public URL of the image or video.

Example https://cdn.example.com/reel.mp4

uploadboolean

Return a one-time upload_url instead of fetching url.

Example true

adjustboolean

Make one version per network that needs it.

Example true

Response

200Media and its fit per network
403Workspace not active