A write (comment), JSON or multipart. comment_id replies to that comment. mentions, external_link, as_organization and attachments answer 422: not offered yet.
Your API key from the console (gw_live_…).
In: header
Path Parameters
The post's social_id (urn:li:activity:… or urn:li:ugcPost:…), as a post read gives it.
Query Parameters
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
application/json
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/urn:li:activity:7390000000000000000/comments?account_id=lg_3f9c2a7b1d" \ -H "Content-Type: application/json" \ -d '{ "account_id": "lg_3f9c2a7b1d", "text": "Congratulations on the launch!" }'{ "object": "CommentSent", "id": "urn:li:comment:(activity:7390000000000000000,7390000000000000123)", "comment_id": "urn:li:comment:(activity:7390000000000000000,7390000000000000123)"}Sync a chat from its beginning GET
Always SYNC_DONE: Swarmhit reads a chat's history from LinkedIn whenever it is asked.
Create a post or a repost POST
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).