LinkedIn Reshare
Reshare (repost) an existing LinkedIn post to your own feed, with optional commentary. Works for both personal profile and company page connections.
Reshare a Post
POST https://api.publora.com/api/v1/linkedin-reshareHeaders
| Header | Required | Description |
|---|---|---|
x-publora-key |
Yes | Your API key |
Content-Type |
Yes | application/json |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
platformId |
string | Yes | LinkedIn connection ID (format: linkedin-ABC123). Determines who authors the reshare — a personal connection reshares as the member, a company-page connection reshares as the organization. |
parent |
string | Yes | URN of the post to reshare. Must be a urn:li:share:<id> or urn:li:ugcPost:<id>. |
commentary |
string | No | Text added above the reshared post. Max 3000 characters. Defaults to empty (a plain reshare with no added text). |
visibility |
string | No | One of PUBLIC or CONNECTIONS. Case-insensitive. Defaults to PUBLIC. |
Note: The reshare is authored automatically as the correct entity for the connection —
urn:li:person:*for a personal profile,urn:li:organization:*for a company page. You do not pass the author yourself.
Response (HTTP 201 Created)
{
"success": true,
"reshare": {
"lifecycleState": "PUBLISHED",
"id": "urn:li:share:7123456789012345678"
}
}Note: Creating a reshare returns HTTP 201, not 200. The
reshare.idis the URN of the newly created reshare post (read from LinkedIn'sx-restli-idresponse header); the rest of thereshareobject is the LinkedIn API response body.
Examples
JavaScript (fetch)
const response = await fetch('https://api.publora.com/api/v1/linkedin-reshare', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-publora-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
platformId: 'linkedin-Tz9W5i6ZYG',
parent: 'urn:li:share:7123456789012345678',
commentary: 'Great read — sharing with my network!',
visibility: 'PUBLIC'
})
});
const data = await response.json();
console.log(data.reshare.id); // urn:li:share:...Python (requests)
import requests
response = requests.post(
'https://api.publora.com/api/v1/linkedin-reshare',
headers={
'Content-Type': 'application/json',
'x-publora-key': 'YOUR_API_KEY'
},
json={
'platformId': 'linkedin-Tz9W5i6ZYG',
'parent': 'urn:li:share:7123456789012345678',
'commentary': 'Great read — sharing with my network!'
}
)
print(response.json()['reshare']['id'])cURL
curl -X POST https://api.publora.com/api/v1/linkedin-reshare \
-H "Content-Type: application/json" \
-H "x-publora-key: YOUR_API_KEY" \
-d '{
"platformId": "linkedin-Tz9W5i6ZYG",
"parent": "urn:li:share:7123456789012345678",
"commentary": "Great read — sharing with my network!",
"visibility": "PUBLIC"
}'Node.js (axios)
const axios = require('axios');
await axios.post(
'https://api.publora.com/api/v1/linkedin-reshare',
{
platformId: 'linkedin-Tz9W5i6ZYG',
parent: 'urn:li:ugcPost:7123456789012345678'
},
{ headers: { 'x-publora-key': 'YOUR_API_KEY' } }
);Errors
| Status | Error | Cause |
|---|---|---|
| 400 | "platformId and parent are required" |
Missing platformId or parent |
| 400 | "platformId must be a string" |
platformId is not a string |
| 400 | "platformId cannot be empty" |
platformId is blank/whitespace |
| 400 | "parent must be a string" |
parent is not a string |
| 400 | "parent cannot be empty" |
parent is blank/whitespace |
| 400 | "parent must be a valid LinkedIn post URN (urn:li:share:<id> or urn:li:ugcPost:<id>)" |
parent is not a share/ugcPost URN |
| 400 | "commentary must be a string" |
commentary is not a string |
| 400 | "commentary cannot exceed 3000 characters" |
commentary is longer than 3000 characters |
| 400 | "visibility must be a string" |
visibility is not a string |
| 400 | "visibility must be one of: PUBLIC, CONNECTIONS" |
visibility is not a valid value |
| 400 | "Invalid platformId" |
platformId format is invalid |
| 400 | "LinkedIn company connection is missing organizationId. Please reconnect the LinkedIn page." |
Company-page connection has no stored organization id — reconnect the page |
| 401 | "API key is required" |
No x-publora-key header provided |
| 401 | "Invalid API key" |
Bad or missing x-publora-key |
| 401 | "LINKEDIN_TOKEN_EXPIRED" |
The LinkedIn access token is expired/invalid — reconnect the account |
| 403 | "API access is not enabled for this account" |
Account does not have API access enabled |
| 404 | "LinkedIn connection not found" |
No LinkedIn account with that platformId for this user |
| 500 | "Failed to create LinkedIn reshare" |
Server error while creating the reshare |
Note: The error response for a failed LinkedIn call includes
detailsandstatusfields:{ "error": "Failed to create LinkedIn reshare", "details": { ... }, "status": <HTTP status> }. Thedetailsfield contains the LinkedIn API error response, andstatusreflects the HTTP status returned by LinkedIn.
Note: Error status codes from the LinkedIn API may be forwarded directly (e.g., 403 if the post's author disabled resharing, 429 on rate limits), so you may receive error codes other than those listed above.
Publora is built by Creative Content Crafts, Inc. Need AI-powered content creation for LinkedIn, Threads, and X? Try Co.Actor — the best AI service for authentic thought leadership at scale.