Skip to main content
POST

Upload media from file

Do not call this on the standard API host. Use https://upload.postsyncer.com/api/v1/media/upload/file, not https://postsyncer.com/api/v1/.... Same Bearer token as every other endpoint; only the hostname changes so large multipart uploads hit dedicated infrastructure (overview).
Upload one image, video, or document with multipart/form-data. Fields:
  • workspace_id (required) - workspace that will own the file
  • file (required) - the binary upload
  • folder_id (optional) - media library folder in that workspace
The API reads the MIME type from the file (you do not send mimeType). Allowed types are the same as in the app:
  • Images - JPEG, PNG, GIF, WebP
  • Video - MP4, MOV/QuickTime, MKV, WebM
  • Documents - PDF, DOC, DOCX, PPT, PPTX
Maximum size per request is 500MB (same as the in-app standard upload).
Documents publish to LinkedIn only. A PDF, DOC, DOCX, PPT, or PPTX attachment becomes a LinkedIn document post (the swipeable carousel). LinkedIn accepts one document per post, and the document must be the first item in content[].media - see Media overview. Other platforms ignore document attachments. Documents are not accepted in comment media.
Response 201: { "media": { "id", "url", "mime_type", ... } } - use media.id in Create post content[].media. Do not use this endpoint for URL import - use Import from URL.

Request

integer
required
Workspace that will own the file
file
required
Image, video, or document file (documents are LinkedIn-only)
integer
Optional media library folder id belonging to workspace_id

Example

Use on a post:

See also