Media
Upload media from file
Single multipart request: send the file plus workspace_id (optional folder_id). MIME type is detected from the file.
POST
Upload media from file
Upload one image, video, or document withmultipart/form-data. Fields:
workspace_id(required) - workspace that will own the filefile(required) - the binary uploadfolder_id(optional) - media library folder in that workspace
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
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.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