LinkedIn Post API: Create & Manage Posts Programmatically 2026

Complete guide to LinkedIn's Post API for creating, scheduling, and managing posts programmatically. Includes code examples, rate limits, and best practices.

Anandi

LinkedIn Post API Integration Guide

The LinkedIn Post API lets developers create, manage, and delete posts on behalf of authenticated users and organization pages — all without touching the LinkedIn interface. Whether you are building a social media dashboard, a content scheduling tool, or automating a founder's personal brand, the Post API is the programmatic backbone that makes it possible. According to LinkedIn's Developer Platform documentation, the Posts API replaced the legacy UGC and Shares APIs as the single recommended endpoint for content publishing in 2024.

But getting it right is harder than it looks. LinkedIn's authentication flow is strict, rate limits are aggressively enforced, and undocumented quirks can stall your integration for days. This guide covers exactly what you need: endpoints, authentication, code examples, rate limits, scheduling, and the mistakes that trip up most developers.

Want to Generate Consistent Inbound Leads from LinkedIn?

Get our complete LinkedIn Lead Generation Playbook used by B2B professionals to attract decision-makers without cold outreach.

How to build authority that attracts leads
Content strategies that generate inbound
Engagement tactics that trigger algorithms
Systems for consistent lead flow

No spam. Just proven strategies for B2B lead generation.

Key Takeaways

  • The LinkedIn Posts API (/rest/posts) is the only recommended endpoint for creating content programmatically — the legacy Shares and UGC APIs are deprecated.
  • OAuth 2.0 three-legged authentication is mandatory. LinkedIn does not support API keys or basic auth for posting. You need a verified app with the w_member_social or w_organization_social permission scope.
  • Rate limits are strict: 100 API calls per user per day for most post creation endpoints. Exceeding this triggers a 24-hour cooldown, not a gradual throttle.
  • LinkedIn's API does not natively support scheduled posts. To schedule content programmatically, you must build your own queue system or use a tool like ConnectSafely that handles scheduling and engagement together.
  • Most API integration failures stem from incorrect URN formatting — the author field requires the format urn:li:person:{id} or urn:li:organization:{id}, and malformed URNs return cryptic 403 errors.

LinkedIn Post API Overview

The Posts API lives under LinkedIn's Community Management suite and supports text posts, articles, images, videos, and multi-image carousels. Here is what the core architecture looks like.

Endpoints

EndpointMethodPurpose
/rest/postsPOSTCreate a new post
/rest/posts/{post-id}GETRetrieve a specific post
/rest/posts/{post-id}DELETEDelete a post
/rest/posts?author={URN}GETList posts by author

All endpoints require the LinkedIn-Version: 202401 header (or later). LinkedIn enforces API versioning strictly — omitting this header returns a 400 Bad Request.

Authentication

LinkedIn uses OAuth 2.0 with a three-legged flow. Here is the process:

  1. Register your app on the LinkedIn Developer Portal. Request the w_member_social scope for personal posts or w_organization_social for company page posts.
  2. Redirect the user to LinkedIn's authorization URL. The user grants your app permission.
  3. Exchange the authorization code for an access token. Tokens expire after 60 days — store the refresh token to avoid re-prompting users.

The w_member_social scope is available through LinkedIn's self-serve developer program. The w_organization_social scope requires Marketing API access, which involves a review process that typically takes 2-4 weeks.

LinkedIn Post API authentication and endpoints overview

For a full breakdown of LinkedIn's API access tiers and gating, see our LinkedIn API complete guide.

How to Create a Post via API

Here are working code examples for creating a text post through the LinkedIn Posts API.

Python

import requests

access_token = "YOUR_ACCESS_TOKEN"
person_urn = "urn:li:person:YOUR_MEMBER_ID"

headers = {
    "Authorization": f"Bearer {access_token}",
    "Content-Type": "application/json",
    "LinkedIn-Version": "202401",
    "X-Restli-Protocol-Version": "2.0.0"
}

payload = {
    "author": person_urn,
    "commentary": "Sharing our latest insights on LinkedIn API integration. The Posts API is the future of programmatic content publishing.",
    "visibility": "PUBLIC",
    "distribution": {
        "feedDistribution": "MAIN_FEED",
        "targetEntities": [],
        "thirdPartyDistributionChannels": []
    },
    "lifecycleState": "PUBLISHED"
}

response = requests.post(
    "https://api.linkedin.com/rest/posts",
    headers=headers,
    json=payload
)

if response.status_code == 201:
    post_id = response.headers.get("x-restli-id")
    print(f"Post created successfully: {post_id}")
else:
    print(f"Error {response.status_code}: {response.json()}")

JavaScript (Node.js)

const axios = require("axios");

const accessToken = "YOUR_ACCESS_TOKEN";
const personUrn = "urn:li:person:YOUR_MEMBER_ID";

const headers = {
  Authorization: `Bearer ${accessToken}`,
  "Content-Type": "application/json",
  "LinkedIn-Version": "202401",
  "X-Restli-Protocol-Version": "2.0.0",
};

const payload = {
  author: personUrn,
  commentary: "Sharing our latest insights on LinkedIn API integration.",
  visibility: "PUBLIC",
  distribution: {
    feedDistribution: "MAIN_FEED",
    targetEntities: [],
    thirdPartyDistributionChannels: [],
  },
  lifecycleState: "PUBLISHED",
};

axios
  .post("https://api.linkedin.com/rest/posts", payload, { headers })
  .then((res) => {
    console.log("Post created:", res.headers["x-restli-id"]);
  })
  .catch((err) => {
    console.error("Error:", err.response?.data);
  });

A successful POST returns a 201 Created status with the post URN in the x-restli-id response header. There is no JSON body in the success response — this is a common point of confusion for developers expecting a JSON object back.

API Endpoints for Post Management

Beyond creating posts, the API supports the full lifecycle.

Retrieve a Post

GET /rest/posts/{encoded-post-urn}

Returns the full post object including commentary, author URN, visibility, creation timestamp, and engagement counts. You need the r_member_social or r_organization_social scope.

Delete a Post

DELETE /rest/posts/{encoded-post-urn}

Permanently removes the post. This action cannot be undone. The post URN must be URL-encoded. Only the post author (or an admin of the organization page) can delete.

List Posts by Author

GET /rest/posts?author={encoded-author-urn}&q=author&count=10&start=0

Returns paginated results. The count parameter accepts a maximum of 100 per request. Use the start parameter for pagination. This is useful for audit tools or dashboards that need to display a user's publishing history.

Important: LinkedIn does not provide an endpoint for editing a published post via API. To modify content, you must delete the original post and create a new one. This is a significant limitation for scheduling tools — any typo correction requires a delete-and-recreate workflow.

Rate Limits and Permissions

LinkedIn enforces aggressive rate limits on the Posts API. Exceeding them results in 429 Too Many Requests with a mandatory cooldown period.

ActionRate LimitCooldown
Create post (per member)100/day24 hours
Create post (per organization)100/day24 hours
Read post100/day per app24 hours
Delete post100/day per app24 hours
Total API calls (per app)100,000/day24 hours

These limits apply per authenticated user, not per app. If your platform manages 50 users, each user gets their own 100-post-per-day allowance.

Required Permission Scopes

ScopeGrants
w_member_socialCreate and delete posts as a member
r_member_socialRead a member's posts
w_organization_socialCreate and delete posts on organization pages
r_organization_socialRead organization page posts

The w_member_social scope is the baseline for any posting integration. Without it, every POST request returns 403 Forbidden. For a deeper dive into LinkedIn's permission model and how it affects messaging and other endpoints, see our messaging API guide.

Scheduling Posts via API

Here is the part most developers hit a wall on: LinkedIn's Posts API has no native scheduling parameter. There is no scheduledPublishTime field, no DRAFT lifecycle state that auto-publishes, and no cron-like trigger built into the API.

To schedule posts programmatically, you need to build your own scheduling layer.

Architecture for a Basic Post Scheduler

  1. Queue system. Store posts with their target publish time in a database (PostgreSQL, Redis, or even a simple cron table).
  2. Worker process. A cron job or task queue (Celery, Bull, or cloud-native like AWS EventBridge) checks for posts whose publish time has arrived.
  3. API call. The worker executes the POST /rest/posts call with the stored payload and access token.
  4. Token management. Access tokens expire every 60 days. Your scheduler must handle token refresh before publishing, or the post silently fails.

This is exactly the kind of infrastructure that turns a "weekend project" into a month-long build. Token refresh handling alone requires secure storage, retry logic, and user notification when refresh tokens expire.

Scheduling posts via LinkedIn API architecture

For teams that need scheduling without building this infrastructure from scratch, see our guide on automating LinkedIn posts for compliant, ready-made approaches.

Common API Errors and Troubleshooting

These are the errors developers encounter most frequently, based on LinkedIn's API error documentation and patterns we have seen across ConnectSafely integrations.

403 Forbidden — Insufficient Permissions

Cause: Your access token lacks the required scope, or the token has expired. Also occurs when the author URN does not match the authenticated user.

Fix: Verify your app has w_member_social approved. Check token expiration. Confirm the author field matches the sub claim in your token.

422 Unprocessable Entity — Invalid URN Format

Cause: The author field contains a malformed URN. Common mistakes include using urn:li:member:{id} instead of urn:li:person:{id}, or passing an unencoded URN in GET requests.

Fix: Always use urn:li:person:{id} for personal posts. URL-encode URNs in query parameters and path variables.

429 Too Many Requests — Rate Limit Exceeded

Cause: You have exceeded the 100 API calls per day limit for the given endpoint.

Fix: Implement exponential backoff. Cache GET responses. Spread post creation across the day rather than batching. The Retry-After header tells you exactly when to retry.

400 Bad Request — Missing Versioning Header

Cause: The LinkedIn-Version header is missing or contains an unsupported version string.

Fix: Always include LinkedIn-Version: 202401 (or the latest supported version) in every request. LinkedIn's API versioning guide lists all supported values.

What Most Guides Get Wrong

"Use the Shares API." The Shares API (/v2/shares) and UGC Post API (/v2/ugcPosts) are deprecated. LinkedIn still accepts requests to these endpoints but no longer guarantees feature parity, and new features (like multi-image posts and article previews) are only available through the Posts API. Every tutorial still referencing /v2/shares is outdated.

"API posting is the same as manual posting." It is not. API-created posts do not support all content types that the manual composer supports. Polls, events, and "celebrate" reactions are not available via API. Documents (PDF carousels) require a multi-step upload process through the /rest/images or /rest/documents endpoints before referencing them in the post payload.

"Rate limits are per-app." Post creation limits are per-user, not per-app. This matters for multi-tenant platforms — you cannot pool your entire user base under one rate limit bucket. Each authenticated user gets 100 posts per day independently.

"You can edit posts via API." You cannot. There is no PUT or PATCH endpoint for published posts. If your scheduling tool lets users "edit" a scheduled post, you need to implement delete-and-recreate logic, which means the post loses its original engagement data.

How ConnectSafely Simplifies LinkedIn Posting

Building a LinkedIn Post API integration from scratch requires handling OAuth flows, token refresh, rate limit management, error retries, and a scheduling queue. For most B2B teams, this is weeks of engineering work that distracts from actually creating content.

ConnectSafely provides a no-code post scheduling alternative that handles the entire pipeline — from content creation to scheduled publishing to post-publish engagement. Instead of managing API tokens and cron jobs, you set your posting schedule and focus on writing content that resonates with your ICP.

What makes ConnectSafely different from a basic scheduler:

  • Scheduling plus inbound engagement. Posts get published on time, and ConnectSafely drives authentic engagement in the critical first-hour window to maximize algorithmic distribution.
  • No API tokens to manage. ConnectSafely handles authentication and token refresh behind the scenes. No developer resources needed.
  • Full analytics pipeline. Track which posts generate profile visits, connection requests, and inbound DMs — not just impressions and likes.
  • Compliant by design. All publishing uses LinkedIn-approved methods, so there is zero risk of account restrictions.

ConnectSafely's post scheduler is completely free — schedule unlimited posts at no cost, no credit card required. Start scheduling for free. For a broader look at LinkedIn automation tools and their limits, our automation limits guide covers compliance in detail.

Frequently Asked Questions

What is the LinkedIn Post API?

The LinkedIn Post API (/rest/posts) is LinkedIn's official endpoint for creating, reading, and deleting posts programmatically. It replaced the deprecated Shares and UGC APIs in 2024 and supports text posts, images, videos, articles, and multi-image carousels. Access requires OAuth 2.0 authentication with the w_member_social scope for personal accounts or w_organization_social for company pages.

How do I get access to the LinkedIn Post API?

Register a developer application on the LinkedIn Developer Portal. Request the w_member_social scope through LinkedIn's self-serve program. For organization page posting, you will need Marketing API access, which requires a review process taking 2-4 weeks. LinkedIn evaluates your use case, privacy practices, and intended data usage before granting access.

Can I schedule LinkedIn posts through the API?

Not directly. The LinkedIn Posts API has no native scheduling parameter or draft-to-publish workflow. To schedule posts programmatically, you must build a separate queue system that stores posts and publishes them at the designated time via API. Tools like ConnectSafely abstract this complexity into a no-code scheduling interface.

What are the rate limits for the LinkedIn Post API?

LinkedIn enforces a limit of 100 post creation API calls per user per day. Exceeding this limit triggers a 429 Too Many Requests response with a 24-hour cooldown. Read and delete operations each have their own 100-per-day limits. The total application-level limit is 100,000 API calls per day across all authenticated users. See LinkedIn's official rate limit documentation for the latest numbers.

Why does my LinkedIn API post return a 403 error?

The three most common causes are: (1) your access token has expired — LinkedIn tokens last 60 days, (2) your app does not have the w_member_social scope approved, or (3) the author URN in your request payload does not match the authenticated user's person URN. Check your token's sub claim against the author field and ensure the token was generated with the correct scopes. Our LinkedIn API complete guide walks through the full debugging workflow.

About the Author

Anandi

Content Strategist, ConnectSafely.ai

LinkedIn growth strategist helping B2B professionals build authority and generate inbound leads.

LinkedIn MarketingB2B Lead GenerationContent StrategyPersonal Branding

Want to Generate Consistent Inbound Leads from LinkedIn?

Get our complete LinkedIn Lead Generation Playbook used by B2B professionals to attract decision-makers without cold outreach.

How to build authority that attracts leads
Content strategies that generate inbound
Engagement tactics that trigger algorithms
Systems for consistent lead flow

No spam. Just proven strategies for B2B lead generation.

Ready to Transform Your LinkedIn Strategy?

Stop chasing leads. Start attracting them with ConnectSafely.ai's inbound lead generation platform.

Get Started Free

See How It Works

Watch how people get more LinkedIn leads with ConnectSafely

Video thumbnail 1
Video thumbnail 2
Video thumbnail 3
Video thumbnail 4
240%
More profile views in 30 days
10-20
Inbound leads per month
8+
Hours saved every week
$35
Average cost per lead