API referenceLinkedin posts
POST
/api/v1/posts

Multipart (with an image) or JSON. A public post (visible to anyone, comments from anyone), a write under its own daily cap (post, 20). text up to 3000 characters; one JPEG, PNG or GIF image in attachments; repost (a post id or urn) shares that post, with text as its commentary or empty. Not offered yet, each answering 422: mentions ({{n}} in the text, mentions), more than one image, a video, external_link, include_job_posting, targeted_audience, as_organization, location, post_type. A post needs text, an image or a repost (400 otherwise).

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Query Parameters

account_id?string

The LinkedIn account (lg_…) to act as. Send it here or as account_id in the body; one of the two is required (400 otherwise).

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/posts?account_id=lg_3f9c2a7b1d" \  -H "Content-Type: application/json" \  -d '{    "account_id": "lg_3f9c2a7b1d",    "text": "We are hiring a Head of Sales!"  }'
{  "object": "PostCreated",  "post_id": "urn:li:share:7390000000000000000"}