LinkedIn Carousel API
How to publish a multi-image carousel or document post to LinkedIn via API.
To publish a LinkedIn carousel via API, send POST /api/posts with up to nine image URLs in the media array — PostGate builds a multi-image share that scrolls horizontally in the feed. Each image can be JPEG, PNG, or GIF up to 8 MB. LinkedIn's PDF Document carousel is a separate format not exposed through the API today.
"Carousel" means two different things on LinkedIn. There's the multi-image post — several photos that scroll horizontally in the feed — and there's the native Document post, where a PDF becomes a swipeable slide deck. PostGate publishes the first today. This page covers what that request looks like and is explicit about the second, so you don't build around a capability that isn't there yet.
How do you publish a multi-image post?
Pass more than one item in media and PostGate builds a LinkedIn multi-image share instead of a single-image one — up to nine images per post, each JPEG, PNG, or GIF, capped at 8 MB. Mixing images and video in the same LinkedIn post isn't possible; a video post is always exactly one file (see LinkedIn Video Upload API).
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-carousel-001" \
-d '{
"post": {
"body": "Four shots from the product launch.",
"options": { "linkedin": { "visibility": "PUBLIC" } }
},
"profiles": ["pro_linkedin456"],
"media": [
"https://cdn.example.com/launch-1.jpg",
"https://cdn.example.com/launch-2.jpg",
"https://cdn.example.com/launch-3.jpg",
"https://cdn.example.com/launch-4.jpg"
]
}'How do you add alt text per image?
Add descriptive alt text for each image in order, matched by index to the media array, under post.options.linkedin.alt_texts. It's optional but worth setting — LinkedIn surfaces per-image alt text to screen readers on the published post.
{
"post": {
"body": "Four shots from the product launch.",
"options": {
"linkedin": {
"visibility": "PUBLIC",
"alt_texts": ["Team on stage", "Product close-up", "Crowd reaction", "Booth signage"]
}
}
},
"profiles": ["pro_linkedin456"],
"media": ["https://cdn.example.com/launch-1.jpg", "https://cdn.example.com/launch-2.jpg", "https://cdn.example.com/launch-3.jpg", "https://cdn.example.com/launch-4.jpg"]
}What about the PDF/slide-deck carousel?
LinkedIn's native Document post — the format commonly used for slide-style carousels — takes a PDF or PPT/PPTX and renders each page as a swipeable card. That is a distinct upload asset type from the images and video PostGate's LinkedIn adapter currently handles, and it isn't exposed through the API today. If a document-style carousel is a hard requirement, check the LinkedIn platform guide for the current state before committing to it, or reach out — it's a reasonable thing to prioritize based on demand.
Frequently asked questions
How many images can a LinkedIn multi-image post have via the API?
Up to nine images per post. Pass more than one item in the media array and PostGate builds a LinkedIn multi-image share instead of a single-image one. Each image can be JPEG, PNG, or GIF, capped at 8 MB.
Can I mix images and video in the same LinkedIn post?
No. Mixing images and video in the same LinkedIn post is not possible — a LinkedIn video post is always exactly one file. If you need video, publish it as its own single-file post; see the LinkedIn Video Upload API guide for that flow.
Can I post a PDF slide-deck carousel to LinkedIn via the API?
Not today. LinkedIn's native Document post — the format commonly used for slide-style carousels — takes a PDF or PPT/PPTX and renders each page as a swipeable card. That is a distinct upload asset type from the images and video PostGate's LinkedIn adapter currently handles, and it is not exposed through the API today.
How do I set alt text for each image in a LinkedIn carousel post?
Add descriptive alt text for each image in order, matched by index to the media array, under post.options.linkedin.alt_texts. It is optional but worth setting — LinkedIn surfaces per-image alt text to screen readers on the published post.
