Skip to main content
POST
Preview a comment prompt against a LinkedIn post

Authorizations

Authorization
string
header
required

Authenticate every request with a Bearer token. Pass your Reply API key in the Authorization header:

Get your API key from the Reply dashboard: Settings → API Key.

Body

application/json

Request body for previewing a comment prompt against a real person's latest LinkedIn post. One Reply credit is spent per call, whatever the outcome.

promptText
string
required

The prompt instructions to test

Maximum string length: 2000
linkedInProfileUrl
string
required

URL of the LinkedIn profile whose latest post the comment is written for

linkedInAccountId
integer
required

ID of the connected LinkedIn account used to look up the post

Required range: x >= 1
skipTopics
string[]

Topics the AI should refuse to comment on. A post matching one of these returns the aiSkip outcome.

skipIfNoPostsInDays
integer | null

Treat the profile as having nothing to comment on when its latest post is older than this many days, returning the noRecentPosts outcome.

Required range: 1 <= x <= 90
sequenceId
integer | null

Sequence to resolve variables against when promptText contains sequence variables. Omit if the prompt has no variables.

Required range: x >= 1

Response

The preview result

The result of a comment preview. Read outcome first — it tells you whether a comment was produced and, if not, why.

outcome
enum<string>
required

Whether a comment was generated, and why not if it was skipped

Available options:
generated,
noRecentPosts,
postsUnavailable,
commentingRestricted,
reshareNoText,
noPostContent,
aiSkip
commentText
string | null

The generated comment. Populated only when outcome is generated.

postText
string | null

The text of the post the comment was written for

detectedTopic
string | null

The topic the AI detected in the post. Useful for checking why a post was skipped.

postUrl
string | null

Link to the post the comment was written for