LinkedIn Reactions
Add or remove reactions on LinkedIn posts programmatically.
Add Reaction
POST https://api.postpost.dev/api/v1/linkedin-reactionsHeaders
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
Content-Type | Yes | application/json |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
postedId | string | Yes | LinkedIn URN (e.g., urn:li:share:123, urn:li:ugcPost:456, urn:li:activity:789) |
reactionType | string | Yes | One of: LIKE, PRAISE, EMPATHY, INTEREST, APPRECIATION, ENTERTAINMENT |
platformId | string | Yes | LinkedIn connection ID (format: linkedin-ABC123) |
Reaction Types
| Type | Emoji | Description |
|---|---|---|
LIKE | 👍 | Thumbs up |
PRAISE | 🔥 | Celebrate / Fire |
EMPATHY | ❤️ | Love / Heart |
INTEREST | 💡 | Insightful / Light bulb |
APPRECIATION | 👏 | Support / Clapping hands |
ENTERTAINMENT | 😄 | Funny / Laughing |
Note: The
reactionTypeparameter is case-insensitive — e.g.,"like","Like", and"LIKE"are all accepted.
Response (HTTP 201 Created)
{
"success": true,
"reaction": { ... },
"urnTranslated": {
"from": "urn:li:activity:7123456789012345678",
"to": "urn:li:ugcPost:7123456789012345678"
}
}Note: Creating a reaction returns HTTP 201, not 200. The
urnTranslatedfield is an object{ from, to }showing the original and canonical URN when translation occurred (e.g.,urn:li:activity:*translated tourn:li:ugcPost:*). It is absent/undefined when no translation was needed.
Examples
JavaScript (fetch)
const response = await fetch('https://api.postpost.dev/api/v1/linkedin-reactions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
postedId: 'urn:li:share:7123456789012345678',
reactionType: 'LIKE',
platformId: 'linkedin-Tz9W5i6ZYG'
})
});
const data = await response.json();
console.log(data.success); // truePython (requests)
import requests
response = requests.post(
'https://api.postpost.dev/api/v1/linkedin-reactions',
headers={
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
json={
'postedId': 'urn:li:share:7123456789012345678',
'reactionType': 'PRAISE',
'platformId': 'linkedin-Tz9W5i6ZYG'
}
)
print(response.json()['success'])cURL
curl -X POST https://api.postpost.dev/api/v1/linkedin-reactions \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"postedId": "urn:li:share:7123456789012345678",
"reactionType": "LIKE",
"platformId": "linkedin-Tz9W5i6ZYG"
}'Node.js (axios)
const axios = require('axios');
await axios.post(
'https://api.postpost.dev/api/v1/linkedin-reactions',
{
postedId: 'urn:li:share:7123456789012345678',
reactionType: 'EMPATHY',
platformId: 'linkedin-Tz9W5i6ZYG'
},
{ headers: { 'x-api-key': 'YOUR_API_KEY' } }
);Remove Reaction
DELETE https://api.postpost.dev/api/v1/linkedin-reactionsRequest Body or Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
postedId | string | Yes | LinkedIn URN |
platformId | string | Yes | LinkedIn connection ID |
Note: Unlike creating a reaction, deleting does not require
reactionType.
Response
{
"success": true,
"reaction": null,
"urnTranslated": {
"from": "urn:li:activity:7123456789012345678",
"to": "urn:li:ugcPost:7123456789012345678"
}
}The reaction field contains the LinkedIn API response data, or null. The urnTranslated field follows the same format as the create response (object or absent).
Examples
JavaScript (fetch)
const response = await fetch('https://api.postpost.dev/api/v1/linkedin-reactions', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
postedId: 'urn:li:share:7123456789012345678',
platformId: 'linkedin-Tz9W5i6ZYG'
})
});Python (requests)
response = requests.delete(
'https://api.postpost.dev/api/v1/linkedin-reactions',
headers={
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
json={
'postedId': 'urn:li:share:7123456789012345678',
'platformId': 'linkedin-Tz9W5i6ZYG'
}
)cURL
curl -X DELETE "https://api.postpost.dev/api/v1/linkedin-reactions?postedId=urn:li:share:7123456789012345678&platformId=linkedin-Tz9W5i6ZYG" \
-H "x-api-key: YOUR_API_KEY"Errors
Create Reaction Errors (POST)
| Status | Error | Cause |
|---|---|---|
| 400 | "postedId, reactionType, and platformId are required" | Missing one or more required fields |
| 400 | "platformId must be a string" | platformId is not a string type |
| 400 | "postedId must be a valid LinkedIn URN" | Not a valid LinkedIn URN format |
| 400 | "reactionType must be one of: LIKE, PRAISE, EMPATHY, INTEREST, APPRECIATION, ENTERTAINMENT" | Not one of the 6 valid types |
| 400 | "Invalid platformId" | platformId format is invalid |
| 401 | "API key is required" | No x-api-key header provided |
| 401 | "Invalid API key" | Bad or missing x-api-key |
| 401 | "Invalid API key owner" | API key owner user not found in database |
| 403 | "API access is not enabled for this account" | Account's plan does not include API access |
| 404 | "LinkedIn connection not found" | No LinkedIn account with that platformId |
| 500 | "Failed to create LinkedIn reaction" | Server error while adding reaction |
Note: The 500 error response includes
detailsandstatusfields:{ "error": "Failed to create LinkedIn reaction", "details": { ... }, "status": <HTTP status> }. Thedetailsfield contains the full LinkedIn API error response object, whose structure depends on what LinkedIn returns (e.g., it may includemessage,status,serviceErrorCode, etc.). Thestatusfield reflects the HTTP status code returned by the LinkedIn API.
Note: Error status codes from the LinkedIn API may be forwarded directly (e.g., 403, 429), so you may receive error codes other than those listed above.
Delete Reaction Errors (DELETE)
| Status | Error | Cause |
|---|---|---|
| 400 | "postedId and platformId are required" | Missing postedId or platformId |
| 400 | "platformId must be a string" | platformId is not a string type |
| 400 | "postedId must be a valid LinkedIn URN" | Not a valid LinkedIn URN format |
| 400 | "Invalid platformId" | platformId format is invalid |
| 401 | "API key is required" | No x-api-key header provided |
| 401 | "Invalid API key" | Bad or missing x-api-key |
| 401 | "Invalid API key owner" | API key owner user not found in database |
| 403 | "API access is not enabled for this account" | Account's plan does not include API access |
| 404 | "LinkedIn connection not found" | No LinkedIn account with that platformId |
| 500 | "Failed to delete LinkedIn reaction" | Server error while removing reaction |
Note: The 500 error response includes
detailsandstatusfields:{ "error": "Failed to delete LinkedIn reaction", "details": { ... }, "status": <HTTP status> }. Thedetailsfield contains the full LinkedIn API error response object, whose structure depends on what LinkedIn returns (e.g., it may includemessage,status,serviceErrorCode, etc.). Thestatusfield reflects the HTTP status code returned by the LinkedIn API.
Note: Error status codes from the LinkedIn API may be forwarded directly (e.g., 403, 429), so you may receive error codes other than those listed above.