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_KEY);

await pk.posts.create({
  accounts: [
    "acc_li_456"
  ],
  content: "We're hiring our first support engineer. Remote, EU hours.",
  linkedin: {
    link: "https://example.com/jobs/support"
  }
});
  • LinkedInpublished

1 call · key customer_42

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

    Make a key

    Create a key for that customer or agent, scoped to their accounts, with the caps you choose.

  3. 3

    Post

    Send the post to /v1/posts with that key. 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/posts2Authorization: Bearer pk_cust_42_…3Content-Type: application/json4 5{6  "accounts": [7    "acc_li_456"8  ],9  "content": "We're hiring our first support engineer. Remote, EU hours.",10  "linkedin": {11    "link": "https://example.com/jobs/support"12  }13}
Response

200 · published

Counted against customer_42 only.

{
  "id": "post_3k9d2",
  "status": "published",
  "results": [
    {
      "account": "acc_li_456",
      "platform": "linkedin",
      "status": "published",
      "url": "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, each under its own key.See the page

Keys & control

Every LinkedIn post has an owner

Each customer or agent posts to LinkedIn through its own key: only its accounts, its own caps, its own log, and an off switch that touches nothing else.

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. Give each workflow its own key.

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

    The MCP server lets Claude, Cursor and other agent tools post through their own key, with caps they can't change.

    • 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. Nothing else on that key is affected.

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 with a key per customer.

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