Comment on Post
Comment on a LinkedIn post
POST
/linkedin/posts/commentComment 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
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID (uses default if not provided) |
postUrl | string | Yes | LinkedIn post URL |
comment | string | Yes | Comment text |
tagPostAuthor | boolean | No | Tag/mention the post author at the beginning of the comment (default: false) |
companyUrn | string | No | Company/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
| Status | Description |
|---|---|
| 200 | Successful 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..."
}
}