Skip to content

LinkedIn Posting API

Post text, images and documents to LinkedIn profiles and company pages from your app.

  • Text, image and document posts
  • Post as a person or as a company page
  • Members connect through LinkedIn's login
  • A clear reason when access needs renewing
post.tsnode
const pk = new Postkey(process.env.POSTKEY_API_KEY);

await pk.posts.create({
  content: "We're hiring our first support engineer. Remote, EU hours.",
  platforms: [
    {
      platform: "linkedin",
      accountId: "int_li_456",
      platformSpecificData: {
        articleUrl: "https://example.com/jobs/support"
      }
    }
  ],
  publishNow: true
});
  • LinkedInpublished

1 call · result per platform

Your first LinkedIn post in three steps

  1. 1

    Connect LinkedIn

    Your customer signs in through LinkedIn's own login. You get an account ID, never a password.

  2. 2

    Get the account id

    List connected accounts. The id of the new account is the accountId you post with.

  3. 3

    Post

    Send the post to /v1/posts with that accountId. The LinkedIn result comes back in the response and by webhook.

Every LinkedIn format, one endpoint

Pick a format to see the exact request and what comes back. Options that only make sense on LinkedIn sit under "linkedin".

A text post, with an optional link.

RequestREST
1POST https://api.postkey.dev/v1/posts2x-access-key: pk_live_…3Content-Type: application/json4 5{6  "content": "We're hiring our first support engineer. Remote, EU hours.",7  "platforms": [8    {9      "platform": "linkedin",10      "accountId": "int_li_456",11      "platformSpecificData": {12        "articleUrl": "https://example.com/jobs/support"13      }14    }15  ],16  "publishNow": true17}
Response

200 · published

Live on LinkedIn. If it had failed, its credits would come back.

{
  "success": true,
  "postId": "post_3k9d2",
  "status": "published",
  "platforms": [
    {
      "platform": "linkedin",
      "accountId": "int_li_456",
      "success": true,
      "platformPostUrl": "https://www.linkedin.com/feed/update/urn:li:share:…"
    }
  ]
}

Everything you need for LinkedIn posting

  • Checked against LinkedIn's rules

    Before anything is sent, Postkey checks it against LinkedIn's published limits:

    Document size
    Up to 100 MBsource
    Document length
    Up to 300 pagessource
    Authors
    A member or an organization pagesource
  • People and pages

    Post as the member who connected, or as a company page they manage. Same call, different account ID.

  • Document posts

    Send a PDF, PowerPoint or Word file and LinkedIn shows it as a swipeable post with a title.

  • Images uploaded for you

    LinkedIn needs media registered and uploaded before the post. Postkey does both steps from one URL.

  • Links

    Add a link to a text post and LinkedIn shows it with the post.

  • Expired access, plainly

    LinkedIn access expires after a while. When it does, the post fails with a reason that says to reconnect, not an opaque error code.

Also for LinkedIn

SchedulingLinkedIn Scheduling APIQueue LinkedIn posts for profiles and company pages, in any time zone.See the page

Built in

Connect, publish, get told

Your users connect LinkedIn through a connect link. If LinkedIn fails inside a multi-network post, the others still go out and the LinkedIn credits come back.

Works with your stack

  • Your code

    Node and Python SDKs with the same calls, or plain REST from anything that speaks HTTP.

    • Node
    • Python
    • {}REST
    Read the docs
  • No-code tools

    Call the REST API from an HTTP step in n8n, Make or Zapier. One request posts to every network.

    • n8n
    • Make
    • Zapier
    Postkey with n8n
  • AI agents & MCP

    The MCP server lets Claude, Cursor and other agent tools publish and schedule posts, and read the results.

    • MCP server
    About the MCP server

LinkedIn posting questions

Something not here? Email hello@postkey.dev.

What can I post to LinkedIn?

Text posts (with an optional link), image posts and document posts.

Can I post to a company page?

Yes, if the person who connected manages that page. Each page gets its own account ID.

What files work as document posts?

PDF, PowerPoint and Word files, within LinkedIn's size and page limits listed above.

What happens when LinkedIn access expires?

The post fails with a plain reason saying the account needs reconnecting. You get an account.reauthorization_required webhook and can send the user a reconnect link.

Can I post the same update to X and Facebook too?

Yes. List the other account IDs in the same request. You get one result per platform.

Can I schedule LinkedIn posts instead?

Yes. Add scheduledFor to the same request. See the LinkedIn Scheduling API page for details.

Post to LinkedIn for every customer.

Get a key, connect an account, send the request above.