curl --request POST \
--url https://openapi.enginy.ai/v1/social-selling/comments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"identityId": 12,
"text": "<string>",
"postId": 501,
"publishingPostId": 29371,
"reactionsAmount": 50,
"reactionTypes": []
}
'import requests
url = "https://openapi.enginy.ai/v1/social-selling/comments"
payload = {
"identityId": 12,
"text": "<string>",
"postId": 501,
"publishingPostId": 29371,
"reactionsAmount": 50,
"reactionTypes": []
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
identityId: 12,
text: '<string>',
postId: 501,
publishingPostId: 29371,
reactionsAmount: 50,
reactionTypes: []
})
};
fetch('https://openapi.enginy.ai/v1/social-selling/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.enginy.ai/v1/social-selling/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identityId' => 12,
'text' => '<string>',
'postId' => 501,
'publishingPostId' => 29371,
'reactionsAmount' => 50,
'reactionTypes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.enginy.ai/v1/social-selling/comments"
payload := strings.NewReader("{\n \"identityId\": 12,\n \"text\": \"<string>\",\n \"postId\": 501,\n \"publishingPostId\": 29371,\n \"reactionsAmount\": 50,\n \"reactionTypes\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://openapi.enginy.ai/v1/social-selling/comments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"identityId\": 12,\n \"text\": \"<string>\",\n \"postId\": 501,\n \"publishingPostId\": 29371,\n \"reactionsAmount\": 50,\n \"reactionTypes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.enginy.ai/v1/social-selling/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identityId\": 12,\n \"text\": \"<string>\",\n \"postId\": 501,\n \"publishingPostId\": 29371,\n \"reactionsAmount\": 50,\n \"reactionTypes\": []\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "<string>",
"data": {
"status": "POSTED",
"publishingPostId": 123,
"identityId": 123,
"scheduledCommentId": 123,
"reactionsScheduled": 123,
"appUrl": "<string>"
}
}Add a comment to a Social Selling post
Post a LinkedIn comment on a Social Selling post from one of your connected identities. Name the post with exactly one of postId (tracked post id, the id of list_social_selling_posts) or publishingPostId (its publishingPostId, or a scheduled post’s id). The post must already be published on LinkedIn. status: POSTED means the comment was sent now and appears on LinkedIn within minutes; PENDING_APPROVAL means the identity belongs to a colleague who reviews comments from it: the comment waits until that owner approves it (they are emailed a review link) and nothing reaches LinkedIn before. Optionally reactionsAmount (0–100) other identities react to the comment, only when it posts right away (POSTED): a PENDING_APPROVAL comment gets no reactions, not even after the owner approves it; reactionsScheduled in the answer says how many were scheduled. Users restricted to specific identities can only comment on posts of their own identities: any other post, a third-party post they tracked included, answers 404. Side effects: persists the comment, starts the LinkedIn comment workflow (or emails the owner), and creates the publishing post of a tracked post that has none. Not idempotent: a retry posts the comment again.
Required scope:
SOCIAL_SELLING_WRITERate limit: 30 requests per minute
curl --request POST \
--url https://openapi.enginy.ai/v1/social-selling/comments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"identityId": 12,
"text": "<string>",
"postId": 501,
"publishingPostId": 29371,
"reactionsAmount": 50,
"reactionTypes": []
}
'import requests
url = "https://openapi.enginy.ai/v1/social-selling/comments"
payload = {
"identityId": 12,
"text": "<string>",
"postId": 501,
"publishingPostId": 29371,
"reactionsAmount": 50,
"reactionTypes": []
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
identityId: 12,
text: '<string>',
postId: 501,
publishingPostId: 29371,
reactionsAmount: 50,
reactionTypes: []
})
};
fetch('https://openapi.enginy.ai/v1/social-selling/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.enginy.ai/v1/social-selling/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identityId' => 12,
'text' => '<string>',
'postId' => 501,
'publishingPostId' => 29371,
'reactionsAmount' => 50,
'reactionTypes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.enginy.ai/v1/social-selling/comments"
payload := strings.NewReader("{\n \"identityId\": 12,\n \"text\": \"<string>\",\n \"postId\": 501,\n \"publishingPostId\": 29371,\n \"reactionsAmount\": 50,\n \"reactionTypes\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://openapi.enginy.ai/v1/social-selling/comments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"identityId\": 12,\n \"text\": \"<string>\",\n \"postId\": 501,\n \"publishingPostId\": 29371,\n \"reactionsAmount\": 50,\n \"reactionTypes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.enginy.ai/v1/social-selling/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identityId\": 12,\n \"text\": \"<string>\",\n \"postId\": 501,\n \"publishingPostId\": 29371,\n \"reactionsAmount\": 50,\n \"reactionTypes\": []\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "<string>",
"data": {
"status": "POSTED",
"publishingPostId": 123,
"identityId": 123,
"scheduledCommentId": 123,
"reactionsScheduled": 123,
"appUrl": "<string>"
}
}Authorizations
Body
The connected LinkedIn identity that comments. It must be an identity the caller may use.
12
The comment text, 1–3000 characters.
1 - 3000Tracked post id (id in list_social_selling_posts). Give exactly one of postId or publishingPostId.
501
Publishing post id (the publishingPostId of a tracked post, or of a scheduled post). Give exactly one of postId or publishingPostId.
29371
Reactions other identities add to the comment (0–100), only when it posts right away (POSTED): a PENDING_APPROVAL comment gets none, even once approved. Default 0.
0 <= x <= 100Reaction kinds for reactionsAmount. Defaults to the LinkedIn mix.
1LIKE, PRAISE, EMPATHY, INTEREST, APPRECIATION, ENTERTAINMENT