Comment on Post

Comment on a LinkedIn post

POST/linkedin/posts/comment

Comment on Post

Comment on a LinkedIn post

Authentication requiredLinkedIn Posts

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/posts/comment' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"postUrl":"https://www.linkedin.com/posts/john-doe-123_...","comment":"Great insights! Thanks for sharing."}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID (uses default if not provided)
postUrlstringYesLinkedIn post URL
commentstringYesComment text
tagPostAuthorbooleanNoTag/mention the post author at the beginning of the comment (default: false)
companyUrnstringNoCompany/organization URN to comment as a company page instead of personal account (optional)

Example

{
  "postUrl": "https://www.linkedin.com/posts/john-doe-123_...",
  "comment": "Great insights! Thanks for sharing."
}

Responses

StatusDescription
200Successful response

200 Example

{
  "success": true,
  "message": "Successfully posted comment",
  "postUrl": "https://www.linkedin.com/posts/john-doe-123_...",
  "comment": "Great insights! Thanks for sharing.",
  "accountId": "507f1f77bcf86cd799439011",
  "postDetails": {
    "activityUrn": "urn:li:activity:...",
    "ugcPostUrn": "urn:li:ugcPost:...",
    "content": "Post content..."
  }
}