Skip to main content
SocialAPI reads and answers the comments on LinkedIn posts through the same comments endpoints as every other platform. What you can do depends on the connected account’s connection_type: A member profile cannot list comments: LinkedIn grants read access to a member’s comments only to apps it selects, and SocialAPI’s app does not have that access. A company Page account replies, likes, and deletes as the Page, and a member profile as the member. A reply, or a top-level comment on a post, costs 1 interaction credit. Listing, liking, and deleting cost no credits.

Endpoints

{post_id} is the LinkedIn post URN, for example urn:li:share:7251234567890123456. It is targets[].platform_post_id on a post you published through SocialAPI, or id in GET /v1/inbox/comments. Put the URN in the path as it is, not URL-encoded, and put a comment URN in the path the same way. {comment_id} and comment_id accept the comment’s sapi_cmt_ ID or its LinkedIn comment URN: see Comment IDs.

List the comments on a company Page post

GET /v1/inbox/comments/{post_id} lists the top-level comments on a post of a company Page. account_id is required.
Response (HTTP 200):
The fields are described in List comments and replies. On LinkedIn they read as follows: The 3 filter parameters moderation_status, order, and q have no effect on LinkedIn. A post with no comments, and a post ID LinkedIn does not know, both return an empty data array, not 404. The comment and reply lists can show a change up to 5 minutes late, whether the change was made on LinkedIn or through SocialAPI: a new comment or reply, a deletion, or a like.

Pagination

Pass next_cursor back as cursor until has_more is false. Treat the cursor as an opaque string. limit is 25 comments or 10 replies by default, up to 100. A value above 100 is treated as 100: see Pagination.

Replies

GET /v1/inbox/comments/{post_id}/{comment_id}/replies lists the replies to one comment, in the same shape. LinkedIn nests comments 1 level deep: a top-level comment has replies, and a reply has no replies of its own.

Posts with comments

GET /v1/inbox/comments?account_id={account_id} returns the account’s posts with comment_count. On a company Page, the list holds the Page’s posts, including posts made outside SocialAPI. On a member profile, the list holds only the posts published through SocialAPI, and comment_count counts the replies and top-level comments posted through SocialAPI, and does not go down when one is deleted. On LinkedIn posts, thumbnail is null and like_count is 0. permalink is the post’s LinkedIn URL for a post published through SocialAPI, and null for a post made on LinkedIn. The parameters are in List posts with comments.

Reply to a comment

POST /v1/inbox/comments/{post_id} posts a public reply as the company Page or as the member. Both connection types can reply.
Response (HTTP 200):
comment_id in the response is the new reply’s sapi_cmt_ ID. Use it to like or delete the reply later.
  • Reply to the top-level comment. LinkedIn nests comments 1 level deep. To answer a reply, set comment_id to the top-level comment that holds it.
  • Text only. A reply carries no image, and SocialAPI has no endpoint to edit a reply once posted.
  • No mentions. The @[Name](urn:li:person:...) mention syntax of LinkedIn publishing does not apply to replies: SocialAPI sends the reply text to LinkedIn exactly as you wrote it.
  • Cost. A reply, or a top-level comment on a post, costs 1 interaction credit. When the plan’s interaction allowance is used up, the call returns 429 validation.interaction_limit_exhausted. A reply that fails with a validation.* error gives the credit back: see When a credit comes back.
  • LinkedIn’s rate limit. LinkedIn limits how many comments one member creates per minute. Past it, the call returns 429 platform.linkedin.rate_limit.

Like and delete a comment

POST /v1/inbox/comments/{post_id}/{comment_id}/like likes a comment as the connected account, and DELETE on the same path removes the like. DELETE /v1/inbox/comments/{post_id}/{comment_id} deletes the comment on LinkedIn and cannot be undone. Each returns { "success": true }. account_id goes in the body for the POST, and in the query for both DELETE calls.
Response (HTTP 200):
can_delete is true on every LinkedIn comment, and LinkedIn decides which comments the account can delete. When LinkedIn refuses, the call returns 403 platform.linkedin.access_denied, and retrying does not help. A comment ID that does not start with sapi_ and is not a LinkedIn comment URN returns 400 validation.comment_urn on delete. Liking, unliking, and deleting cost no credits.

Comment IDs

A LinkedIn comment has 2 IDs, and every endpoint above accepts both:
  • id, the sapi_cmt_ ID SocialAPI returns in lists and in the reply response.
  • platform_id, LinkedIn’s comment URN: urn:li:comment:(urn:li:activity:{activity ID},{comment ID}).
A member profile cannot list comments, so it acts on the comments whose IDs it already holds: the comment_id of each reply it posted, and comment URNs taken from LinkedIn. A URN you build yourself must use the urn:li:activity: form. On a reply or a like, LinkedIn refuses a comment URN built on a urn:li:share: ID, and the call returns 400 validation.field_required with meta.field set to request_body. ID rules for every platform are in IDs.

What LinkedIn does not allow

  • Hide and unhide. LinkedIn has no hidden comments. POST and DELETE on /v1/inbox/comments/{post_id}/{comment_id}/hide return 501 resource.not_supported. Delete the comment instead.
  • Private replies. LinkedIn has no private reply to a commenter. POST /v1/inbox/comments/{post_id}/{comment_id}/private-reply returns 501 resource.not_supported, or 400 validation.field_not_supported when the request carries attachment. LinkedIn direct messages are not available either.
  • Reading comments as a member profile. On a member profile, listing comments or replies returns 501 resource.not_supported. Connect the company Page to read the comments on its posts.
  • Comment events. SocialAPI sends no comment.received event for LinkedIn. List the comments on a company Page post to find new ones. Comments that mention the company Page come through Mentions and the mention.received event: see the Mentions row in LinkedIn capabilities.

Errors and debugging

Check these in order when a LinkedIn comment call fails. The shared checks are in Comments, and every code is in Errors.
  1. 501 resource.not_supported. The call lists comments or replies on a member profile, hides, unhides, or sends a private reply. Connect the company Page to list its comments, and delete a comment instead of hiding it. Hiding or unhiding on an account without comments.write returns 403 account.permission_missing instead.
  2. 401 platform.linkedin.auth. LinkedIn rejected the token, and the account is now token_expired. Reconnect it: see LinkedIn. 401 platform.linkedin.unauthorized leaves the account usable: retry, and reconnect if it persists.
  3. 403 platform.linkedin.access_denied. LinkedIn refused the action for this account, for example a delete it does not allow. Reconnecting does not change it. Read message.
  4. 404 account.not_found on an account you hold. LinkedIn refused the action without naming a reason. On a company Page, check that the member who connected it still administers it. Then reconnect the account.
  5. 400 validation.comment_urn, 400 validation.id_invalid. On a delete, a comment ID that does not start with sapi_ and is not a LinkedIn comment URN returns validation.comment_urn. On any call, a malformed sapi_ ID returns validation.id_invalid. Send the sapi_cmt_ ID or the platform_id from a list.
  6. 400 validation.field_required with meta.field set to request_body. LinkedIn rejected the request as malformed, for example a reply or a like on a comment URN built on a urn:li:share: ID. Use the urn:li:activity: form: see Comment IDs.
  7. 404 resource.not_found. LinkedIn does not know the comment or the post on a reply, like, or delete, for example because it was deleted on LinkedIn.
  8. 429 platform.linkedin.rate_limit. LinkedIn’s rate limit, or LinkedIn being temporarily unavailable. Back off and retry.
  9. platform.linkedin.api_error. LinkedIn returned an error that has no specific code. When LinkedIn gives a reason, error.message carries it. Retry later, and stop if it repeats.

Permissions and scopes

Each operation needs an account permission on the connected account. The LinkedIn scopes behind each permission are in LinkedIn scopes. On a company Page, listing comments or replies without comments.read returns 403 account.permission_missing. On either connection type, replying, liking, unliking, deleting, hiding, or unhiding without comments.write returns 403 account.permission_missing. error.meta.permission names the permission. On a member profile, listing returns 501 resource.not_supported whatever its permissions. GET /v1/inbox/comments never returns account.permission_missing. A key without the scope returns 403 auth.insufficient_scope: see Scoped API keys.

Use from an AI agent

The tool list is in MCP tools.
  • LinkedIn API: capabilities, connect rules, mentions, insights, and scopes for LinkedIn
  • LinkedIn publishing: publish the posts these comments arrive on
  • Comments: the endpoints, fields, and rules shared by every platform
  • IDs: the sapi_cmt_ ID and the platform IDs these endpoints accept
  • Plans and usage: what costs an interaction credit
Last modified on November 15, 2026