curl --request POST \
--url https://api.reply.io/v3/ai-prompts/preview/sample \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"promptText": "Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.",
"skipTopics": [
"politics",
"religion",
"personal topics"
],
"sequenceId": 4521
}
'import requests
url = "https://api.reply.io/v3/ai-prompts/preview/sample"
payload = {
"promptText": "Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.",
"skipTopics": ["politics", "religion", "personal topics"],
"sequenceId": 4521
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
promptText: 'Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.',
skipTopics: ['politics', 'religion', 'personal topics'],
sequenceId: 4521
})
};
fetch('https://api.reply.io/v3/ai-prompts/preview/sample', 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.reply.io/v3/ai-prompts/preview/sample",
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([
'promptText' => 'Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.',
'skipTopics' => [
'politics',
'religion',
'personal topics'
],
'sequenceId' => 4521
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.reply.io/v3/ai-prompts/preview/sample"
payload := strings.NewReader("{\n \"promptText\": \"Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.\",\n \"skipTopics\": [\n \"politics\",\n \"religion\",\n \"personal topics\"\n ],\n \"sequenceId\": 4521\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.reply.io/v3/ai-prompts/preview/sample")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"promptText\": \"Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.\",\n \"skipTopics\": [\n \"politics\",\n \"religion\",\n \"personal topics\"\n ],\n \"sequenceId\": 4521\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/ai-prompts/preview/sample")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"promptText\": \"Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.\",\n \"skipTopics\": [\n \"politics\",\n \"religion\",\n \"personal topics\"\n ],\n \"sequenceId\": 4521\n}"
response = http.request(request)
puts response.read_body{
"outcome": "generated",
"commentText": "The point about onboarding friction really lands — we saw the same drop-off until we cut the setup steps in half.",
"postText": "After six months of user interviews, the biggest blocker we found wasn't pricing. It was onboarding friction.",
"detectedTopic": "product onboarding",
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7100000000000000000"
}Preview a comment prompt against a sample post
New. This endpoint shipped recently. If anything about it is unclear or could work better for you, tell us in the developer Slack.
sequences:operate scope (or a broader one that includes it).
Try a comment prompt against a generic sample post. Nothing is fetched from LinkedIn and no Reply credits are spent.
curl --request POST \
--url https://api.reply.io/v3/ai-prompts/preview/sample \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"promptText": "Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.",
"skipTopics": [
"politics",
"religion",
"personal topics"
],
"sequenceId": 4521
}
'import requests
url = "https://api.reply.io/v3/ai-prompts/preview/sample"
payload = {
"promptText": "Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.",
"skipTopics": ["politics", "religion", "personal topics"],
"sequenceId": 4521
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
promptText: 'Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.',
skipTopics: ['politics', 'religion', 'personal topics'],
sequenceId: 4521
})
};
fetch('https://api.reply.io/v3/ai-prompts/preview/sample', 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.reply.io/v3/ai-prompts/preview/sample",
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([
'promptText' => 'Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.',
'skipTopics' => [
'politics',
'religion',
'personal topics'
],
'sequenceId' => 4521
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.reply.io/v3/ai-prompts/preview/sample"
payload := strings.NewReader("{\n \"promptText\": \"Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.\",\n \"skipTopics\": [\n \"politics\",\n \"religion\",\n \"personal topics\"\n ],\n \"sequenceId\": 4521\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.reply.io/v3/ai-prompts/preview/sample")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"promptText\": \"Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.\",\n \"skipTopics\": [\n \"politics\",\n \"religion\",\n \"personal topics\"\n ],\n \"sequenceId\": 4521\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/ai-prompts/preview/sample")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"promptText\": \"Write a short, genuine comment that reacts to one concrete point in the post. Avoid flattery and never pitch.\",\n \"skipTopics\": [\n \"politics\",\n \"religion\",\n \"personal topics\"\n ],\n \"sequenceId\": 4521\n}"
response = http.request(request)
puts response.read_body{
"outcome": "generated",
"commentText": "The point about onboarding friction really lands — we saw the same drop-off until we cut the setup steps in half.",
"postText": "After six months of user interviews, the biggest blocker we found wasn't pricing. It was onboarding friction.",
"detectedTopic": "product onboarding",
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7100000000000000000"
}Authorizations
Authenticate every request with a Bearer token. Pass your Reply API key in the
Authorization header:
Authorization: Bearer <your-api-key>
Get your API key from the Reply dashboard: Settings → API Key.
Body
Request body for previewing a comment prompt against a generic sample post.
The prompt instructions to test
2000Topics the AI should refuse to comment on. A post matching one of these returns the aiSkip outcome.
Sequence to resolve variables against when promptText contains sequence variables. Omit if the prompt has
no variables.
x >= 1Response
The preview result
The result of a comment preview. Read outcome first — it tells you whether a comment was produced and, if not,
why.
Whether a comment was generated, and why not if it was skipped
generated, noRecentPosts, postsUnavailable, commentingRestricted, reshareNoText, noPostContent, aiSkip The generated comment. Populated only when outcome is generated.
The text of the post the comment was written for
The topic the AI detected in the post. Useful for checking why a post was skipped.
Link to the post the comment was written for