LinkedIn Posting API
A posting API for LinkedIn, covering text, image, and video posts through one request envelope.
A LinkedIn posting API integration through PostGate is four steps: a member connects once via LinkedIn OAuth (the w_member_social scope), you publish through the shared POST /api/posts envelope with a post.options.linkedin block, optionally schedule with scheduled_at or a queue, and confirm delivery per target via the targets array or webhooks.
A LinkedIn posting API for your product needs to cover more than one call: connecting an account, sending text and media through one shape, scheduling ahead, and knowing whether the post actually landed. This page maps PostGate's surface for LinkedIn end to end. For any single piece in depth, jump to the dedicated page linked in each section.
How do you connect a profile?
A member authorizes PostGate through LinkedIn's OAuth consent screen, requesting the w_member_social scope needed to post, comment, and like on their behalf (plus openid profile for identity). PostGate stores the resulting profile as a stable pro_ ID you reuse on every request — see LinkedIn API Permissions. Standard member access tokens are short-lived by LinkedIn's own policy, so PostGate tracks reconnection windows and surfaces awaiting_reconnect before a post silently fails.
How does the shared request shape work?
Every platform, including LinkedIn, is published through the same POST /api/posts envelope: a shared post.body, a profiles array for routing, optional media, and a post.options.linkedin block for provider-specific fields like visibility and disable_reshare.
curl -X POST "https://postgate.studio/api/posts?profile_group_id=grp_acme123" \
-H "Authorization: Bearer $POSTGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": {
"body": "Hiring three engineers this quarter.",
"options": { "linkedin": { "visibility": "PUBLIC" } }
},
"profiles": ["pro_linkedin456"],
"media": ["https://cdn.example.com/hiring.png"]
}'Which formats does LinkedIn accept?
LinkedIn posts through PostGate accept up to 3,000 characters, links inline, up to nine images (JPEG, PNG, or GIF, 8 MB each), or a single MP4 video up to roughly 5 GB and 15 minutes — LinkedIn accepts one video per post, never mixed with images. See LinkedIn Carousel API for multi-image posts and LinkedIn Video Upload API for the video path.
How do you publish now, later, or on a recurring slot?
The same request either publishes immediately, saves as draft: true for approval, publishes at a fixed scheduled_at instant, or takes the next open slot with scheduled_at: "queue". Full detail in LinkedIn Scheduling API.
How do you confirm delivery per target?
The create response is acceptance, not confirmation. Read the targets array — or subscribe to webhooks — for the LinkedIn target's terminal state: published with a permalink, failed with a structured error, or skipped. See Delivery lifecycle and LinkedIn API Rate Limit for the retryable rate_limited case.
Frequently asked questions
What are the LinkedIn post limits when publishing through the API?
LinkedIn posts through PostGate accept up to 3,000 characters with links inline, up to nine images (JPEG, PNG, or GIF, 8 MB each), or a single MP4 video up to roughly 5 GB and 15 minutes. LinkedIn accepts one video per post, never mixed with images.
What OAuth scope does a LinkedIn posting integration need?
The member authorizes through LinkedIn's OAuth consent screen with the w_member_social scope, which covers posting, commenting, and liking on their behalf, plus openid profile for identity. PostGate stores the resulting profile as a stable pro_ ID you reuse on every request.
Why do LinkedIn connections need periodic reconnection?
Standard member access tokens are short-lived by LinkedIn's own policy. PostGate tracks reconnection windows and surfaces an awaiting_reconnect state before a post silently fails, so your product can prompt the member to reauthorize in time.
Can I schedule or draft LinkedIn posts through the API?
Yes. The same request either publishes immediately, saves as draft: true for approval, publishes at a fixed scheduled_at instant, or takes the next open slot in a recurring queue with scheduled_at set to "queue". The LinkedIn Scheduling API guide covers each mode in detail.
