Reply to a post
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/posts/{post_id}/commentsReplies under an X post (or under a reply, with comment_id) from the account's own X. If the post was edited, the reply goes under its latest version. Paced like posts; answer: true replies to someone who answered the account have their own 200 a day.
Scope: accounts.write.
Authentication
X-API-KEY header·A Lempile API key, made in the dashboard under Access tokens.Path parameters
post_idstringrequiredThe post to reply under.
Headers
Idempotency-Keystringrequired1–200 characters of
A-Z a-z 0-9 . _ : -. The same key with the same request replays the first answer; see Write receipts.≤ 200 chars
Request body
account_idstringrequiredtextstringrequired≤ 1250 charscomment_idstringA reply's id (digits, as a string): the reply goes under it instead.
Pattern^[0-9]+$answerbooleanThis answers someone who replied to the account: counts toward the separate 200-a-day cap.
navigationstringtimelinefinds the post in the account's Following feed first, as a person scrolling would, then falls back to its page;directopens the post's page. Default: the post's page.One oftimelinedirectauthor_handlestringThe post author's X handle, which
timelinelooks for in the feed.≤ 15 charsdry_runbooleanEverything but the Reply button: the browser reaches the post, types the text, attaches the video and checks Reply could be pressed, then closes the tab. Nothing is sent: the answer is
200CommentDryRunand the key is free again. Not withcomment_id. Part of the request'sIdempotency-Key.
account_idstringrequiredtextstringrequired≤ 1250 charsattachmentsstring · binaryOne MP4 video of 50 MiB (52,428,800 bytes) at most, under the reply. It goes only once X shows it ready (up to 3 minutes). Not with
comment_id. Part of the request'sIdempotency-Key.answerstringThis answers someone who replied to the account: counts toward the separate 200-a-day cap.
One oftruefalsenavigationstringAs in the JSON body.
One oftimelinedirectauthor_handlestringAs in the JSON body.
≤ 15 charsdry_runstringAs in the JSON body.
One oftruefalse
Responses
200A dry run (dry_run): nothing was sent. media is what X showed for the video: its words and the seconds until Ready.
dry_run): nothing was sent. media is what X showed for the video: its words and the seconds until Ready.201Replied. With a video, media is what X showed for it; warnings says what the browser didn't confirm (video_unconfirmed, dry_run_ignored): the reply is out, check it on X.
›
media is what X showed for it; warnings says what the browser didn't confirm (video_unconfirmed, dry_run_ignored): the reply is out, check it on X.application/json
objectanyAlwaysCommentSentprovideranyAlwaysXcomment_idstring | nullnullwhen X gave no link; the reply still went out.viastringOne oftimelinedirectedited_fromstringWhen the post was edited: the id the reply was asked for.
mediaobjectWith a video: what X showed for it (
status, X's own words) and the seconds until Ready (ready_s).›Show fieldsHide fields
statusstringready_snumber
warningsarray of stringWhat the browser didn't confirm:
video_unconfirmed,dry_run_ignored. The reply is out; check it on X.
400Missing or invalid parameters or Idempotency-Key.
›
application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
401Missing or invalid API key ({error, message}), errors/disconnected_account, or errors/reauth_required when X is signed out in the account's browser.
›
{error, message}), errors/disconnected_account, or errors/reauth_required when X is signed out in the account's browser.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
402subscription_required: the workspace has no active trial or subscription.
›
subscription_required: the workspace has no active trial or subscription.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
404errors/resource_not_found: no such account in this workspace, or it isn't an X account.
›
errors/resource_not_found: no such account in this workspace, or it isn't an X account.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
409errors/in_progress or errors/account_busy.
›
errors/in_progress or errors/account_busy.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
422errors/not_sent (the browser stopped before Reply; code says why, e.g. replies_limited when the author limits who can reply), errors/reply_button_disabled, errors/idempotency_key_reused, errors/x_app_not_loaded, proxy errors.
›
errors/not_sent (the browser stopped before Reply; code says why, e.g. replies_limited when the author limits who can reply), errors/reply_button_disabled, errors/idempotency_key_reused, errors/x_app_not_loaded, proxy errors.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
423errors/x_account_locked: X shows the account its lock page (x.com/account/access). Nothing was done; someone has to pass X's check.
›
errors/x_account_locked: X shows the account its lock page (x.com/account/access). Nothing was done; someone has to pass X's check.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
429errors/too_fast, errors/daily_limit, errors/answers_daily_limit or errors/browser_busy, with retry_at.
›
errors/too_fast, errors/daily_limit, errors/answers_daily_limit or errors/browser_busy, with retry_at.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
503errors/service_unavailable (the account isn't ready, or the browser runner can't be reached), errors/no_client_session, or errors/maintenance with retry_at.
›
errors/service_unavailable (the account isn't ready, or the browser runner can't be reached), errors/no_client_session, or errors/maintenance with retry_at.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
504errors/timeout: Reply was pressed but X didn't confirm. Read the receipt.
›
errors/timeout: Reply was pressed but X didn't confirm. Read the receipt.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
Was this page helpful?