Replies
Reply under an X post or a reply, find the post in the account's feed first, and read a post's replies.
Early access. Tell us what you're building and we'll set you up. Contact us
Reply To A Post#
POST /posts/{post_id}/comments (accounts.write, Idempotency-Key
required):
curl -sS -X POST "https://api.lempile.com/posts/1850000000000000001/comments" \
-H "X-API-KEY: $LEMPILE_API_KEY" \
-H "Idempotency-Key: reply-1850000000000000001-1" \
-H "Content-Type: application/json" \
-d '{ "account_id": "janedemo", "text": "Congrats on the launch.", "navigation": "timeline", "author_handle": "marclou" }'{ "object": "CommentSent", "provider": "X", "comment_id": "1850000000000000099", "via": "timeline" }text: up to 1,250 characters.comment_id: a reply's id, as a string of digits: the reply goes under that reply instead.navigation:timelinelooks for the post in the account's Following feed first, as a person scrolling would (giveauthor_handle), then falls back to its page;directopens the post's page.viasays which happened.answer: true: this answers someone who replied to the account. It counts toward its own 200 a day instead of the posts' 70.- If the post was edited, the reply goes under its latest version
(
edited_fromnames the id you asked for). comment_idin the answer isnullwhen X gave no link; the reply still went out.
When the post's author limits who can reply, nothing is sent:
422 errors/not_sent, with that reason in detail. Replies share the posts'
pace and their 504 errors/timeout rule: read the
receipt before sending again.
Read A Post's Replies#
GET /posts/{post_id}/comments?account_id=&limit=&sort_by=&comment_id=
(accounts.read): the replies the post's page shows (limit up to 100,
default 50).
sort_by:MOST_RECENT(the default) puts them newest first bydate;MOST_RELEVANTkeeps X's own order.comment_id: a reply's id. Its own replies come back instead.cursor: X's replies come in one page, so a cursor answers400 errors/invalid_parameters; every answer'scursorisnull.
{ "object": "CommentList", "total_items": 1, "cursor": null,
"items": [{ "object": "Comment", "post_id": "1850000000000000001", "id": "1850000000000000099",
"author": "Sam Doe", "text": "Congrats on the launch.", "date": "2026-11-06T09:30:00.000Z" }] }Was this page helpful?