Facebook Pixel
APILinkedIn Posts

Reply to a comment

Post a reply to an existing comment on a LinkedIn post. Replies appear threaded under the original comment. Optionally tag a member with a real @mention that notifies them (e.g. the original commenter) by passing `mention`. Useful for continuing conversations and engaging with community discussions.

POST/reply
Authentication requiredPosts

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/reply' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"commentId":"12345","reply":"Thanks for the thoughtful comment, {{user}} — totally agree!","mention":{"name":"Jane Smith","profileUrn":"urn:li:fsd_profile:ACoAABcdefgh"}}'

Post a reply to an existing comment on a LinkedIn post. Replies appear threaded under the original comment. Optionally tag a member with a real @mention that notifies them (e.g. the original commenter) by passing mention. Useful for continuing conversations and engaging with community discussions.

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
commentIdstringYesID of the comment to reply to (from /posts/comments response)
replystringYesReply text content. Supports hashtags. When mention is provided, place a {{user}} placeholder where the tag should appear — otherwise the tagged member's name is prepended.
mentionobjectNoOptional @mention to tag a member in the reply. Produces a real LinkedIn tag that notifies the member (e.g. tag the original commenter). The visible tag replaces the {{user}} placeholder in reply (or is prepended if no placeholder is present).

Example

{
  "commentId": "12345",
  "reply": "Thanks for the thoughtful comment, {{user}} — totally agree!",
  "mention": {
    "name": "Jane Smith",
    "profileUrn": "urn:li:fsd_profile:ACoAABcdefgh"
  }
}

Responses

StatusDescription
200Reply posted successfully

200 Response Parameters

NameTypeDescription
successboolean
replyIdstring

200 Example

{
  "success": true,
  "replyId": "12345"
}