curl --request POST \
--url https://openapi.enginy.ai/v1/social-selling/comment-suggestions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"postId": 812,
"publishingPostId": 123,
"postContent": "<string>",
"identityIds": [
12,
34
],
"tone": "SUPPORTIVE",
"length": "SHORT",
"useEmojis": false,
"count": 3
}
'import requests
url = "https://openapi.enginy.ai/v1/social-selling/comment-suggestions"
payload = {
"postId": 812,
"publishingPostId": 123,
"postContent": "<string>",
"identityIds": [12, 34],
"tone": "SUPPORTIVE",
"length": "SHORT",
"useEmojis": False,
"count": 3
}
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({
postId: 812,
publishingPostId: 123,
postContent: '<string>',
identityIds: [12, 34],
tone: 'SUPPORTIVE',
length: 'SHORT',
useEmojis: false,
count: 3
})
};
fetch('https://openapi.enginy.ai/v1/social-selling/comment-suggestions', 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/comment-suggestions",
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([
'postId' => 812,
'publishingPostId' => 123,
'postContent' => '<string>',
'identityIds' => [
12,
34
],
'tone' => 'SUPPORTIVE',
'length' => 'SHORT',
'useEmojis' => false,
'count' => 3
]),
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/comment-suggestions"
payload := strings.NewReader("{\n \"postId\": 812,\n \"publishingPostId\": 123,\n \"postContent\": \"<string>\",\n \"identityIds\": [\n 12,\n 34\n ],\n \"tone\": \"SUPPORTIVE\",\n \"length\": \"SHORT\",\n \"useEmojis\": false,\n \"count\": 3\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/comment-suggestions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"postId\": 812,\n \"publishingPostId\": 123,\n \"postContent\": \"<string>\",\n \"identityIds\": [\n 12,\n 34\n ],\n \"tone\": \"SUPPORTIVE\",\n \"length\": \"SHORT\",\n \"useEmojis\": false,\n \"count\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.enginy.ai/v1/social-selling/comment-suggestions")
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 \"postId\": 812,\n \"publishingPostId\": 123,\n \"postContent\": \"<string>\",\n \"identityIds\": [\n 12,\n 34\n ],\n \"tone\": \"SUPPORTIVE\",\n \"length\": \"SHORT\",\n \"useEmojis\": false,\n \"count\": 3\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "<string>",
"data": {
"suggestions": [
{
"identityId": 123,
"identityName": "<string>",
"commentText": "<string>"
}
]
}
}Generate Social Selling comment suggestions
Write AI comment suggestions for a LinkedIn post, each one from a different identity of your team, in that identity’s voice (job title, seniority, interests) and in the language of the post. Pass exactly one post source: postId (a tracked post id from the Social Selling posts list), publishingPostId (a publishing post id, e.g. the publishingPostId of a tracked post) or postContent (the text of any post). Users restricted to specific identities only reach posts of their own identities through postId / publishingPostId (404 otherwise, a tracked third-party post included); pass any other post’s text as postContent. Choose the writers with identityIds, or omit it and the AI picks the most relevant identities you may use, never the post’s own author. Tune tone, length, useEmojis and count (1–6, default 3). Generation takes up to 60 seconds. Read-only: nothing is posted, scheduled or stored. To publish a suggestion, call add_a_comment_to_a_social_selling_post with the same postId or publishingPostId, the suggestion’s identityId, and its commentText as text.
Required scope:
SOCIAL_SELLING_READRate limit: 10 requests per minute
curl --request POST \
--url https://openapi.enginy.ai/v1/social-selling/comment-suggestions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"postId": 812,
"publishingPostId": 123,
"postContent": "<string>",
"identityIds": [
12,
34
],
"tone": "SUPPORTIVE",
"length": "SHORT",
"useEmojis": false,
"count": 3
}
'import requests
url = "https://openapi.enginy.ai/v1/social-selling/comment-suggestions"
payload = {
"postId": 812,
"publishingPostId": 123,
"postContent": "<string>",
"identityIds": [12, 34],
"tone": "SUPPORTIVE",
"length": "SHORT",
"useEmojis": False,
"count": 3
}
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({
postId: 812,
publishingPostId: 123,
postContent: '<string>',
identityIds: [12, 34],
tone: 'SUPPORTIVE',
length: 'SHORT',
useEmojis: false,
count: 3
})
};
fetch('https://openapi.enginy.ai/v1/social-selling/comment-suggestions', 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/comment-suggestions",
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([
'postId' => 812,
'publishingPostId' => 123,
'postContent' => '<string>',
'identityIds' => [
12,
34
],
'tone' => 'SUPPORTIVE',
'length' => 'SHORT',
'useEmojis' => false,
'count' => 3
]),
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/comment-suggestions"
payload := strings.NewReader("{\n \"postId\": 812,\n \"publishingPostId\": 123,\n \"postContent\": \"<string>\",\n \"identityIds\": [\n 12,\n 34\n ],\n \"tone\": \"SUPPORTIVE\",\n \"length\": \"SHORT\",\n \"useEmojis\": false,\n \"count\": 3\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/comment-suggestions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"postId\": 812,\n \"publishingPostId\": 123,\n \"postContent\": \"<string>\",\n \"identityIds\": [\n 12,\n 34\n ],\n \"tone\": \"SUPPORTIVE\",\n \"length\": \"SHORT\",\n \"useEmojis\": false,\n \"count\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.enginy.ai/v1/social-selling/comment-suggestions")
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 \"postId\": 812,\n \"publishingPostId\": 123,\n \"postContent\": \"<string>\",\n \"identityIds\": [\n 12,\n 34\n ],\n \"tone\": \"SUPPORTIVE\",\n \"length\": \"SHORT\",\n \"useEmojis\": false,\n \"count\": 3\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "<string>",
"data": {
"suggestions": [
{
"identityId": 123,
"identityName": "<string>",
"commentText": "<string>"
}
]
}
}Authorizations
Body
Tracked post id (id in the Social Selling posts list). Its text in Enginy is the post to comment on.
812
Publishing post id (publishingPostId of a tracked post, or a post scheduled or published from Enginy). Its text is the post to comment on.
The post text itself, for a post that is not in Enginy (or has no text there).
1 - 10000Identities that may write a suggestion (at most one suggestion each). Every id must be an identity of this workspace the caller may use. Omit to let the AI pick the most relevant identities the caller may use, never the post’s own author.
1 - 20 elements[12, 34]
SUPPORTIVE (congratulate, agree, add a short insight) or FUNNY (good-natured joke).
SUPPORTIVE, FUNNY ULTRA_SHORT (2–6 words) or SHORT (1–2 sentences).
ULTRA_SHORT, SHORT Add 1–3 emojis per comment. Off by default.
How many suggestions to write; fewer come back when fewer identities are available.
1 <= x <= 6