Connect a LinkedIn account first: either the member's personal profile or an organization Page they administer. Then publish commentary with at most one kind of media: one image, 2–20 images, one video, or one PDF document. Upload media with POST /api/v1/media/uploads using platform: "linkedin" and pass each uploadId as upload_id. The post is public. LinkedIn returns its URN straight away, but it can take a minute for the post to show on LinkedIn.
Rate limits
LinkedIn limits how many calls each app and each member can make in a day. Once a limit is reached, LinkedIn answers 429 until the next day, and Adeli returns 429 rate_limited.
Body
platform"linkedin"RequiredaccountIduuidRequired- A connected LinkedIn account in your workspace: a personal profile or an organization Page.
profileIduuid- Optional because accountId names its profile. If both are sent, they must agree.
commentarystringRequired- The public post text. Send
""for a media-only post. Write plain text: Adeli escapes LinkedIn's reserved characters, and#wordbecomes a hashtag. mentionsarray- Up to 20
{ urn, name, offset }mentions.namemust appear incommentaryat characteroffset;urnisurn:li:organization:<id>orurn:li:person:<id>. LinkedIn offers apps no way to look people up, so a person mention needs a URN you already have. imageobject- One image:
{ upload_id, title? }, or{ content_type, base64, title? }for compatibility. JPEG, PNG, or GIF, at most 20 MB and fewer than 36 million pixels. imagesarray- A multi-image post: 2 to 20
{ upload_id, alt_text? }images, shown in order. videoobject- One
{ upload_id, title? }MP4, 75 KB to 500 MB and 3 seconds to 30 minutes. Adeli waits for LinkedIn to finish processing before it creates the post. documentobject- One
{ upload_id, title }PDF of up to 100 MB, shown as swipeable slides. The title is required.
Add one kind of media. A multi-image post:
{ "images": [{ "upload_id": "linkedin/staging/…", "alt_text": "The new dashboard" }, { "upload_id": "linkedin/staging/…" }] }A video, or a PDF document carousel:
{ "video": { "upload_id": "linkedin/staging/…", "title": "Launch demo" } }
{ "document": { "upload_id": "linkedin/staging/…", "title": "Q3 results" } }Sending more than one of image, images, video, and document returns 400. To mention a Page, include its name in the commentary and point at it:
{
"commentary": "Thanks to Acme for the launch",
"mentions": [{ "urn": "urn:li:organization:42", "name": "Acme", "offset": 10 }]
}Adeli does not automatically retry post creation: if LinkedIn's answer is ambiguous, retrying could publish a duplicate. An expired connection returns connection_expired; reconnect the account before publishing again.