Repost a post, or undo a repost
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/posts/repostA plain repost of one X post. A post the account already reposted stays as it is (already: true). With undo: true, takes the account's repost of that post back instead: X's green Repost button, then Undo repost, answered once the post shows its plain Repost button (PostUnreposted; a post it hasn't reposted answers already: true with nothing pressed). An undo's receipt fingerprint differs from the repost's, so one key never covers both. Not paced.
Scope: accounts.write.
Authentication
X-API-KEY header·A Lempile API key, made in the dashboard under Access tokens.Headers
Idempotency-KeystringOptional. With a key, the write gets a receipt (
GET /writes/{key}) and a repeat replays the first answer.≤ 200 chars
Request body
account_idstringrequiredpost_idstringrequiredThe post to repost, or (with
undo) the post the account reposted.Pattern^[0-9]+$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 charsundobooleantruetakes the account's repost back.trueorfalseonly: any other value answers400. X only (a LinkedIn post answers501).Defaultfalse
Responses
200Reposted, or (with undo) the repost taken back.
›
undo) the repost taken back.application/json
PostRepostedPostReposted›Show fieldsHide fields
objectanyAlwaysPostRepostedprovideranyAlwaysXpost_idstringalreadybooleanviastring
PostUnrepostedPostUnreposted›Show fieldsHide fields
objectanyAlwaysPostUnrepostedprovideranyAlwaysXpost_idstringalreadybooleantrue: the account hadn't reposted it; nothing was pressed.viastring
400errors/invalid_parameters: no X post id, or undo that isn't true or false.
›
errors/invalid_parameters: no X post id, or undo that isn't true or false.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/post_not_found.
›
errors/post_not_found.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/repost_unavailable (X didn't offer Repost, or Undo repost), errors/not_reposted or errors/not_unreposted. Nothing changed.
›
errors/repost_unavailable (X didn't offer Repost, or Undo repost), errors/not_reposted or errors/not_unreposted. Nothing changed.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…
501errors/feature_not_implemented: undo on a LinkedIn post.
›
errors/feature_not_implemented: undo on a LinkedIn post.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…
502errors/repost_unconfirmed: check the post; doing it again changes nothing.
›
errors/repost_unconfirmed: check the post; doing it again changes nothing.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.
›
errors/timeout.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?