Preview a comment prompt against a LinkedIn post
sequences:operate scope (or a broader one that includes it).
Use this endpoint to test a comment prompt against a real person’s latest LinkedIn post. Pass the profile you want to comment on and the connected LinkedIn account to look it up with; postText and postUrl in the response show which post the comment was written for. One Reply credit is held before generation starts and is spent whatever the result, including when no comment is produced, so prefer the sample preview while you are still iterating on wording. Check outcome to see what happened: generated means commentText holds the result, while any other value explains why the AI produced nothing.
Authorizations
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
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.
The prompt instructions to test
2000URL of the LinkedIn profile whose latest post the comment is written for
ID of the connected LinkedIn account used to look up the post
x >= 1Topics the AI should refuse to comment on. A post matching one of these returns the aiSkip outcome.
Treat the profile as having nothing to comment on when its latest post is older than this many days, returning
the noRecentPosts outcome.
1 <= x <= 90Sequence 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