Skip to main content

Supported source files

File contents are validated after upload. Platform publishing rules may impose additional duration, codec, attachment, and caption requirements.

CLI and MCP

The CLI handles transfer and validation and returns ready media. Hosted MCP’s upload_media accepts a publicly accessible HTTPS URL. It cannot read a local path. Local stdio MCP can accept a file inside its configured media root.

HTTP upload

  1. Call POST /media/uploads with filename, contentType, and sizeBytes.
  2. For a single upload, PUT the raw file bytes to data.uploadUrl with the matching Content-Type.
  3. Call POST /media/MEDIA_ID/complete to validate the uploaded file.
  4. Use the ready media ID in the post’s mediaIds array.
Never attach the Postinger Authorization header to the signed storage URL. That URL already authorizes the upload.
Replace 12345 with the actual file size. Set UPLOAD_URL to the returned URL, then upload and complete:

Multipart video uploads

When multipart is true, uploadUrl is empty. Split the file using the returned partSize. Call /media/MEDIA_ID/multipart with operation: "sign" and a one-based partNumber for each part, then PUT its bytes to the returned URL. Use operation: "list" to inspect uploaded parts and operation: "complete" to assemble them. Finally call /media/MEDIA_ID/complete to validate the complete file. operation: "abort" cancels an unfinished multipart upload. If an upload result is uncertain, inspect the reported media ID before creating another reservation.