Answer Comment
curl --request POST \
--url https://api.linkupapi.com/v1/posts/answer-comment \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"tracking_id": "<string>",
"profile_urn": "<string>",
"comment_urn": "<string>",
"login_token": "<string>",
"comment_text": "<string>",
"mention_user": true,
"commenter_name": "<string>",
"country": "<string>"
}
'import requests
url = "https://api.linkupapi.com/v1/posts/answer-comment"
payload = {
"tracking_id": "<string>",
"profile_urn": "<string>",
"comment_urn": "<string>",
"login_token": "<string>",
"comment_text": "<string>",
"mention_user": True,
"commenter_name": "<string>",
"country": "<string>"
}
headers = {
"x-api-key": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tracking_id: '<string>',
profile_urn: '<string>',
comment_urn: '<string>',
login_token: '<string>',
comment_text: '<string>',
mention_user: true,
commenter_name: '<string>',
country: '<string>'
})
};
fetch('https://api.linkupapi.com/v1/posts/answer-comment', 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://api.linkupapi.com/v1/posts/answer-comment",
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([
'tracking_id' => '<string>',
'profile_urn' => '<string>',
'comment_urn' => '<string>',
'login_token' => '<string>',
'comment_text' => '<string>',
'mention_user' => true,
'commenter_name' => '<string>',
'country' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-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://api.linkupapi.com/v1/posts/answer-comment"
payload := strings.NewReader("{\n \"tracking_id\": \"<string>\",\n \"profile_urn\": \"<string>\",\n \"comment_urn\": \"<string>\",\n \"login_token\": \"<string>\",\n \"comment_text\": \"<string>\",\n \"mention_user\": true,\n \"commenter_name\": \"<string>\",\n \"country\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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://api.linkupapi.com/v1/posts/answer-comment")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tracking_id\": \"<string>\",\n \"profile_urn\": \"<string>\",\n \"comment_urn\": \"<string>\",\n \"login_token\": \"<string>\",\n \"comment_text\": \"<string>\",\n \"mention_user\": true,\n \"commenter_name\": \"<string>\",\n \"country\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v1/posts/answer-comment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tracking_id\": \"<string>\",\n \"profile_urn\": \"<string>\",\n \"comment_urn\": \"<string>\",\n \"login_token\": \"<string>\",\n \"comment_text\": \"<string>\",\n \"mention_user\": true,\n \"commenter_name\": \"<string>\",\n \"country\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Comment answered with success"
}
Content & Posts
Answer Comment
Reply to a comment on a LinkedIn post
POST
/
v1
/
posts
/
answer-comment
Answer Comment
curl --request POST \
--url https://api.linkupapi.com/v1/posts/answer-comment \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"tracking_id": "<string>",
"profile_urn": "<string>",
"comment_urn": "<string>",
"login_token": "<string>",
"comment_text": "<string>",
"mention_user": true,
"commenter_name": "<string>",
"country": "<string>"
}
'import requests
url = "https://api.linkupapi.com/v1/posts/answer-comment"
payload = {
"tracking_id": "<string>",
"profile_urn": "<string>",
"comment_urn": "<string>",
"login_token": "<string>",
"comment_text": "<string>",
"mention_user": True,
"commenter_name": "<string>",
"country": "<string>"
}
headers = {
"x-api-key": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tracking_id: '<string>',
profile_urn: '<string>',
comment_urn: '<string>',
login_token: '<string>',
comment_text: '<string>',
mention_user: true,
commenter_name: '<string>',
country: '<string>'
})
};
fetch('https://api.linkupapi.com/v1/posts/answer-comment', 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://api.linkupapi.com/v1/posts/answer-comment",
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([
'tracking_id' => '<string>',
'profile_urn' => '<string>',
'comment_urn' => '<string>',
'login_token' => '<string>',
'comment_text' => '<string>',
'mention_user' => true,
'commenter_name' => '<string>',
'country' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-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://api.linkupapi.com/v1/posts/answer-comment"
payload := strings.NewReader("{\n \"tracking_id\": \"<string>\",\n \"profile_urn\": \"<string>\",\n \"comment_urn\": \"<string>\",\n \"login_token\": \"<string>\",\n \"comment_text\": \"<string>\",\n \"mention_user\": true,\n \"commenter_name\": \"<string>\",\n \"country\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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://api.linkupapi.com/v1/posts/answer-comment")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tracking_id\": \"<string>\",\n \"profile_urn\": \"<string>\",\n \"comment_urn\": \"<string>\",\n \"login_token\": \"<string>\",\n \"comment_text\": \"<string>\",\n \"mention_user\": true,\n \"commenter_name\": \"<string>\",\n \"country\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v1/posts/answer-comment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tracking_id\": \"<string>\",\n \"profile_urn\": \"<string>\",\n \"comment_urn\": \"<string>\",\n \"login_token\": \"<string>\",\n \"comment_text\": \"<string>\",\n \"mention_user\": true,\n \"commenter_name\": \"<string>\",\n \"country\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Comment answered with success"
}
Reply to an existing comment on a LinkedIn post using the comment URN.
This endpoint costs 1 credit per request. Ignore this if you’re on per-seat pricing: usage is unlimited.
Header Parameters
string
required
Your API key
Body Parameters
string
required
Unique identifier for tracking the request
string
required
LinkedIn profile URN of the user posting the comment
string
required
LinkedIn comment URN to reply to
string
required
LinkedIn authentication cookie obtained from the login/verify process
string
required
Text content of the reply to post
boolean
default:"false"
Whether to mention the original commenter in the reply
string
default:""
Name of the original commenter (required if mention_user is true)
string
default:"FR"
Country code for proxy selection. Available: (US, UK, FR, DE, NL, IT, IL, CA, BR, ES, IN)
Response
string
Request status (success/error)
string
Detailed status message about the comment reply request
{
"status": "success",
"message": "Comment answered with success"
}
Notes
- The comment URN must be valid and accessible with the provided login token
- Replies are posted with the identity associated with the login token
- Reply text supports plain text only
- When
mention_useris true, thecommenter_nameparameter is required - LinkedIn’s rate limits and spam detection apply to comment replies
- Some posts or comments may have replies disabled by their authors
Was this page helpful?