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.
/posts/repostCode Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/posts/repost' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"accountId":"acc_12345","postUrl":"https://linkedin.com/posts/example-post","shareUrn":"urn:li:example:123456","ugcPostUrn":"urn:li:share:7012345678901234567","activityUrn":"urn:li:example:123456"}'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 | No | Full URL of the LinkedIn post to repost. Will be scraped to extract URNs. |
shareUrn | string | No | Share URN of the post (e.g., "urn:li:share:7416350085304987648"). Use if you already have the URN. |
ugcPostUrn | string | No | UGC Post URN (e.g., "urn:li:ugcPost:7417595827650519041"). Used as fallback if shareUrn not available. |
activityUrn | string | No | Activity URN for pre-repost signal (e.g., "urn:li:activity:7416350088379338752"). Optional but recommended. |
Example
{
"accountId": "acc_12345",
"postUrl": "https://linkedin.com/posts/example-post",
"shareUrn": "urn:li:example:123456",
"ugcPostUrn": "urn:li:share:7012345678901234567",
"activityUrn": "urn:li:example:123456"
}Responses
| Status | Description |
|---|---|
| 200 | Repost created successfully |
| 400 | Invalid request or unable to extract URNs |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Server error - Failed to repost |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
message | string | |
repostUrn | string | URN of the created repost |
resourceKey | string | Resource key of the repost |
shareUrn | string | Share URN that was reposted |
ugcPostUrn | string | UGC Post URN that was reposted (if shareUrn not available) |
activityUrn | string | Activity URN used for tracking |
accountId | string | LinkedIn account ID that performed the repost |
200 Example
{
"success": true,
"message": "Repost successful",
"repostUrn": "urn:li:fsd_repost:urn:li:instantRepost:(urn:li:share:7430667225633550337,7432008152021254154)",
"resourceKey": "urn:li:fsd_repost:urn:li:instantRepost:(urn:li:share:7430667225633550337,7432008152021254154)",
"shareUrn": "urn:li:share:7430667225633550337",
"activityUrn": "urn:li:activity:7430667226199830528",
"accountId": "696ce9e780e0483585e4e553"
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | string | |
shareUrn | string | |
ugcPostUrn | string |
400 Example
{
"error": "Either postUrl, shareUrn, or ugcPostUrn 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 repost",
"success": false
}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.
Get comments from a post
Retrieve comments from a LinkedIn post with pagination support. Useful for analyzing engagement, finding leads who commented, or monitoring discussions. Returns comment content, author info, timestamps, and like counts.
