Skip to main content

LinkedIn API Guide

Publish text posts, image posts, videos, and PDF carousel documents to LinkedIn profiles and company pages. PostEverywhere handles LinkedIn's multi-step media upload and UGC post creation through a single API call. For a general overview of all supported platforms, see the Introduction.

Supported Content Types

Content TypeMedia RequiredDescription
Text postNonePlain text post with no media attachments.
Image postImage(s)Post with one or more images. Supports JPEG, PNG, WebP, and HEIC.
Video postVideo (MP4)Native video post uploaded directly to LinkedIn.
PDF carouselDocument (PDF)A PDF uploaded as a document post. LinkedIn displays each page as a swipeable carousel slide.

LinkedIn is one of the most versatile platforms, supporting images, videos, and PDF documents in a single API.

Platform-Specific Settings

Use the platform_content.linkedin object to customise your LinkedIn post:

{
"platform_content": {
"linkedin": {
"content": "LinkedIn-specific text (max 3000 chars)",
"settings": {
"visibility": "PUBLIC",
"firstComment": "First comment text"
}
}
}
}

Settings Reference

SettingTypeDefaultDescription
contentstringOverride the default text with a LinkedIn-specific version. Max 3,000 characters.
settings.visibilitystring"PUBLIC"Who can see the post. See values below.
settings.firstCommentstringText posted as the first comment after publishing. Useful for adding links or CTAs.

Visibility Options

ValueDescription
PUBLICVisible to everyone on LinkedIn, including non-connections.
CONNECTIONSVisible only to your 1st-degree connections.
LOGGED_IN_MEMBERSVisible to any logged-in LinkedIn user, but not in public search.

Example: Create a Post

Schedule a LinkedIn Post with a PDF Carousel

curl -X POST https://app.posteverywhere.ai/api/v1/posts \
-H "Authorization: Bearer $POSTEVERYWHERE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Default caption for other platforms",
"account_ids": [2275],
"media_ids": ["a7b8c9d0-e1f2-3456-7890-abcdef012345"],
"scheduled_at": "2026-04-16T08:30:00Z",
"timezone": "America/New_York",
"platform_content": {
"linkedin": {
"content": "I spent the last 6 months analyzing what makes content go viral on LinkedIn.\n\nHere are the 10 patterns I found (swipe through the carousel):\n\n1. Hook in the first line\n2. Use data, not opinions\n3. One idea per slide\n...\n\nDrop a comment if you want the full PDF.",
"settings": {
"visibility": "PUBLIC",
"firstComment": "Download the full report here: https://example.com/report"
}
}
}
}'

Schedule a Connections-Only Text Post

curl -X POST https://app.posteverywhere.ai/api/v1/posts \
-H "Authorization: Bearer $POSTEVERYWHERE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Thinking about our next product direction.",
"account_ids": [2275],
"scheduled_at": "2026-04-16T12:00:00Z",
"timezone": "America/Chicago",
"platform_content": {
"linkedin": {
"content": "I have been reflecting on what our customers actually need vs. what we assumed they wanted.\n\nThe gap is bigger than expected.\n\nMore soon — would love your thoughts in the comments.",
"settings": {
"visibility": "CONNECTIONS"
}
}
}
}'

Requirements & Limits

RequirementLimit
Post text length3,000 characters
First comment length1,250 characters
Image formatsJPEG, PNG, WebP, HEIC
Image max file size20 MB
Video formatMP4 (H.264)
Video max file size500 MB
Video duration3 seconds - 10 minutes
Document formatPDF
Document max file size20 MB
PDF carousel pagesUp to 300 pages (practical limit ~20 for engagement)
Recommended image ratio1.91:1 (landscape) or 1:1 (square)

Tips

  • Use PDF carousels for high engagement. LinkedIn's algorithm favors carousel documents because they increase dwell time. Upload a multi-page PDF and each page becomes a swipeable slide. Keep it to 8-12 slides for optimal engagement.
  • Put links in firstComment, not the post body. LinkedIn's algorithm deprioritizes posts with external links in the main text. Use firstComment to add your link after publishing — this keeps your reach high while still driving traffic.
  • Write longer, value-driven posts. LinkedIn rewards posts between 1,000-2,000 characters. Use the full 3,000-character limit to tell a story or share insights. The first line is your hook — make it count.

Frequently Asked Questions

Upload a PDF file using the Upload Media endpoint, then include the returned media_id in your Create Post request. LinkedIn automatically displays each page of the PDF as a swipeable carousel slide. Keep carousels to 8-12 slides for best engagement.

Can I post to LinkedIn company pages, not just personal profiles?

Yes. Connect your LinkedIn company page as a social account in PostEverywhere, then use the company page's account_id when creating a post. The API supports both personal profiles and company pages.

What is the firstComment setting used for on LinkedIn?

The firstComment field posts a reply to your own post immediately after publishing. This is commonly used to add external links or CTAs. LinkedIn's algorithm deprioritizes posts that contain links in the main body, so placing links in the first comment preserves your organic reach.

What is the maximum character limit for LinkedIn posts?

LinkedIn posts support up to 3,000 characters. Posts between 1,000 and 2,000 characters tend to perform best. The first line of your post is your hook -- it appears before the "see more" fold, so make it count.

  • X (Twitter) -- professional commentary and thought leadership
  • Facebook -- similar post formats with image, video, and link support
  • Threads -- short-form text posts for conversation

Further Reading