React to a LinkedIn post
Add a reaction to a LinkedIn post. LinkedIn supports 6 reaction types beyond simple likes. Reactions are a lightweight way to engage with content and increase visibility in your network. Supports reacting as a company page if you have admin access.
/posts/reactCode Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/posts/react' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"postUrl":"https://linkedin.com/posts/example-post"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
postUrl | string | Yes | Full URL of the LinkedIn post to react to. Can also provide threadUrn directly instead. |
threadUrn | string | No | Thread URN of the post. If provided, skips URL scraping for faster execution. |
reactionType | string | No | Reaction type: LIKE (thumbs up), PRAISE (clap), APPRECIATION (heart), EMPATHY (caring), INTEREST (insightful), ENTERTAINMENT (funny) |
companyUrn | string | No | Company URN to react as company page instead of personal profile (e.g., "urn:li:fsd_company:123456"). Requires admin access to the company page. |
Example
{
"postUrl": "https://linkedin.com/posts/example-post"
}Responses
| Status | Description |
|---|---|
| 200 | Reaction added successfully |
| 400 | Bad request - Missing required fields or validation error |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Server error - Failed to react to post |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
message | string | Success message describing the action |
postUrl | string | URL of the post that was reacted to |
threadUrn | string | Thread URN of the post |
reactionType | string | Type of reaction applied (LIKE, PRAISE, etc.) |
accountId | string | LinkedIn account ID that added the reaction |
companyUrn | string | Company URN if reacted as company page |
postDetails | object | Details about the post that was reacted to |
200 Example
{
"success": true,
"message": "Successfully reacted to post with LIKE reaction",
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7430667226199830528/",
"threadUrn": "urn:li:activity:7430667226199830528",
"reactionType": "LIKE",
"accountId": "696ce9e780e0483585e4e553",
"postDetails": {
"activityUrn": "urn:li:activity:7430667226199830528",
"ugcPostUrn": null,
"shareUrn": "urn:li:share:7430667225633550337",
"featuredActivityUrn": null,
"content": "Discover proven LinkedIn strategies for consultants to attract high-value clients..."
}
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
400 Example
{
"error": "Either postUrl or threadUrn must be provided",
"success": false
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "Failed to react to post",
"success": false
}Comment on a LinkedIn post
Add a comment to a LinkedIn post. Comments increase engagement and visibility. Can optionally tag the post author for notification. Supports posting as a company page if you have admin access. Rate limit: 100 comments per day.
Repost a LinkedIn post
Repost/share a LinkedIn post to your feed. This creates an instant repost without additional commentary. Requires either a post URL (will be scraped for URNs) or the share/ugcPost URN directly. The activityUrn is optional but helps with engagement tracking.
