LinkedIn Video Upload API
How to upload and publish video to LinkedIn using the API.
To upload a video to LinkedIn via API, pass exactly one MP4 URL in the media array of POST /api/posts — PostGate runs LinkedIn's initialize/upload/finalize sequence for you before creating the share. LinkedIn accepts MP4 only, up to roughly 5 GB and 15 minutes, and exactly one video per post, never mixed with images.
LinkedIn doesn't accept a video as one file attached to a post request — it initializes an upload, expects the bytes in one or more chunks against signed URLs, then asks you to finalize it before the video can be referenced in a share. PostGate runs that whole exchange for you; from your side, publishing a LinkedIn video still looks like a single call.
How do you attach the video?
Pass exactly one video URL in media — LinkedIn video posts support one file, never combined with images. PostGate fetches it, confirms the MIME type is video/mp4 (the only container LinkedIn's video endpoint documents), and runs the initialize/upload/finalize sequence against LinkedIn before creating the share.
curl -X POST "https://postgate.studio/api/posts?profile_group_id=grp_acme123" \
-H "Authorization: Bearer $POSTGATE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: linkedin-video-001" \
-d '{
"post": {
"body": "Two minutes on what we shipped this sprint.",
"options": {
"linkedin": { "visibility": "PUBLIC" },
"title": "Sprint recap"
}
},
"profiles": ["pro_linkedin456"],
"media": ["https://cdn.example.com/sprint-recap.mp4"]
}'What does LinkedIn actually accept?
- Container/codec: MP4 only — other containers (MOV, WEBM) are rejected or fail processing, so PostGate validates before upload rather than let LinkedIn discover it later.
- File size: up to roughly 5 GB.
- Duration: up to 15 minutes (900 seconds).
- Exactly one video per post — no mixing with images.
How should you handle large files?
A multi-gigabyte file is safer as a pre-uploaded media object with its own bytes declared up front, especially for a scheduled post: PostGate can validate and probe duration well ahead of the publish attempt instead of doing it inline with the request, and a scheduled post revalidates the asset again right before it fires.
Can you set a title or custom thumbnail?
An optional title under post.options is attached to the video asset. LinkedIn's upload initialization also accepts flags for captions and a custom thumbnail; PostGate does not currently expose either, so LinkedIn generates its own thumbnail from the video.
Frequently asked questions
What video formats does the LinkedIn API accept?
MP4 only — it is the only container LinkedIn's video endpoint documents. Other containers like MOV and WEBM are rejected or fail processing, which is why PostGate confirms the MIME type is video/mp4 and validates before upload rather than letting LinkedIn discover the problem later.
Why can't I just attach a video file directly to a LinkedIn post request?
LinkedIn does not accept a video as one file attached to a post request. It initializes an upload, expects the bytes in one or more chunks against signed URLs, then asks you to finalize before the video can be referenced in a share. PostGate runs that whole exchange, so from your side it is still a single call.
Can I set a custom thumbnail on a LinkedIn video via the API?
Not currently. LinkedIn's upload initialization accepts flags for captions and a custom thumbnail, but PostGate does not expose either today, so LinkedIn generates its own thumbnail from the video. An optional title under post.options is attached to the video asset.
How should I handle multi-gigabyte videos for scheduled LinkedIn posts?
Pre-upload the file as a media object with its own bytes declared up front. PostGate can then validate and probe duration well ahead of the publish attempt instead of doing it inline with the request, and a scheduled post revalidates the asset again right before it fires.
