X write
How to undo a retweet with the Twitter API
Learn how to undo a retweet on Twitter by Tweet ID. Remove one repost, poll the write action, verify completion, and handle Twitter API undo retweet errors.
- 200
- 202
- 400
- 401
- 402
- 403
- 409
- 422
- 429
- 500
- 503
DELETE
How to undo a retweet with the Twitter API
10 credits per call · All plans from $0.00012/credit
statusUrl until terminal becomes true.
The route preserves the source tweet and its original author.
It does not remove likes, follows, replies, bookmarks, or original tweets.
Compare X’s separate Unrepost Post endpoint.
X also publishes a Retweet management guide.
Authenticate and approve the reposting account
Send an Xquik API key or OAuth 2.1 bearer token. Name 1 connected X account in the request body. Never send an X password or session cookie. Show the specific tweet and acting account before approval. Include the author, text, media, Tweet ID, and removal reason.Remove one repost by tweet ID
Resolve the source Tweet ID before approval. Do not use a timeline position or search-result index. Send the ID as a string to preserve all digits. Generate a new idempotency key for the removal. Do not reuse the key from the original repost. Reuse the key when a response gets interrupted. Store the action ID before starting another removal. PollstatusUrl while terminal is false.
Choose unretweet, delete tweet, or unlike
Use Unretweet for an unchanged repost of someone else’s tweet. It removes only the acting account’s repost relationship. Use Delete Tweet for original or quote tweets. Use Unlike Tweet for likes. X Premium’s Undo Post feature is different. It delays publication during a short preview window. Unretweet removes a repost that already exists.Verify repost removal and timeline state
Storeid as the durable write action ID.
Poll the same statusUrl until terminal becomes true.
Store the account, source Tweet ID, request hash, billing, and both action IDs.
Close already-removed actions without another request.
Keep the prior repost state after a final failure.
A cached timeline can lag behind the write result.
X documents that delay in its repost help.
Schedule repost cleanup without bulk unretweet
Use your scheduler when a repost should end later. The endpoint accepts 1 Tweet ID per request. It has no bulk unretweet body. To delete retweets in a queue, approve each Tweet ID separately.Handle Twitter undo retweet errors
Fix the ID or account after400.
Replace Xquik authentication after 401; reconnect the account after 403.
Add credits after 402; review rejected input after 422.
Honor Retry-After after 429.
After 500 or 503, check safeToRetry before retrying.
Use nextAction to choose the next step.
Twitter undo retweet questions
How do I undo a retweet on Twitter with an API?
Approve the account and source Tweet ID. Send this DELETE request; poll until terminal.Can I undo recent, old, or several retweets?
Submit recent or old removals individually. The X Premium Undo Post window does not limit this endpoint.Why can’t I undo a retweet on Twitter?
Check authentication, credits, account connection, and the source tweet.What happens to the tweet, engagement, and notifications?
Unretweet keeps the source tweet and author intact. It does not change likes, replies, bookmarks, or source content. The action does not track notification delivery. Cached timelines can lag behind the terminal result.Do I use a Twitter archive, retweet icon, or delete button?
A Twitter archive can help identify an old source Tweet ID. In X, use the green retweet icon for reposts. Use a delete button to delete tweets you published. Never delete the original source tweet during an unretweet.Headers
string
Send
Bearer <token> instead of x-api-key when using OAuth 2.1.string
required
Unique key for this intended write. Reuse it only for an exact network replay.
string
required
Must be
application/json.Path parameters
string
required
Source Tweet ID to remove from the selected account’s reposts.
Body
string
required
X username or account ID that owns the repost. The
@ prefix is optional.Response
Durable write recovery
- Store
id, the nestedhashinrequest,billing, andstatusUrl. - Poll after
Retry-AfterorpollAfterMswhenterminalisfalse. - Trust
safeToRetryandnextActionbefore any new write.
200 Terminal or 202 active
Store terminal results. Poll active actions without creating another write.- After HTTP
200, store the result and settled billing. - After HTTP
202, poll the same action. Never submit another write. - After HTTP
400, fix the named field. Use a new idempotency key. - After HTTP
401, fix authentication. Do not retry unchanged. - After HTTP
402, fund the account before another write. - After HTTP
403, reconnect the account. - After HTTP
409, keep the original action. Use a new key for new input. - After HTTP
422, fix the rejected request before retrying. - After HTTP
429, wait forRetry-After. Preserve the same key. - After HTTP
500, retry only whensafeToRetryistrue. - After HTTP
503, poll whileterminalisfalse.
- 200
- 202
- 400
- 401
- 402
- 403
- 409
- 422
- 429
- 500
- 503
How to undo a retweet with the Twitter API