LinkedIn Analytics

Add a comment to a LinkedIn post

Post a comment on a LinkedIn post. Supports replies to existing comments via the parentComment parameter. Raw input may be up to 10000 characters; after mention processing, the text sent to LinkedIn must be at most 1250 characters. Supports @mentions using @{urn:li:person:ID|Name} or @{urn:li:organization:ID|Company} syntax.

post/linkedin-comments

Request body

postedIdstring required

LinkedIn post URN (urn:li:share:, urn:li:ugcPost:, or urn:li:activity:*). Activity URNs are attempted directly, with same-ID ugcPost/share fallbacks for retryable LinkedIn target errors.

messagestring required

Raw comment input (max 10000 characters); after mention conversion, the sent text is limited to 1250 characters. Supports @{urn:li:person:ID|Name} and organization mentions.

platformIdstring required

LinkedIn connection ID

parentCommentstring

Optional parent comment URN for replies

Example request

{
  "postedId": "urn:li:share:7123456789012345678",
  "message": "Great insights @{urn:li:person:ACoAABcD1234EfG|Jane Smith}! Thanks for sharing.",
  "platformId": "linkedin-Tz9W5i6ZYG",
  "parentComment": "urn:li:comment:(urn:li:activity:123,456)"
}

Response

Comment created

successboolean

Example response

{
  "success": true
}

Changes