X write
Twitter unfollow API: unfollow one X user by ID
Unfollow one X user by ID from a connected account. Poll the write action, respect the 20 per minute and 400 per day limits, and verify the relationship.
- 200
- 202
- 400
- 401
- 402
- 403
- 404
- 409
- 422
- 429
- 500
- 503
DELETE
Twitter unfollow API: unfollow one X user by ID
Unfollow one Twitter user by ID
Each request unfollows 1 target user ID. Each request names 1 connected X account. Verify the target user ID and acting account before approval. Compare X’s separate Unfollow User endpoint.10 credits per call · All plans from $0.00012/credit
Authenticate and select the relationship
Send an Xquik API key or OAuth 2.1 bearer token. Never send an X password or session cookie. The path ID names the profile that the acting account follows. The body names the connected account that will stop following it. Use the stable numeric user ID as the relationship key. Keep the username and profile name as review labels. Show both profiles before a user approves the write action. The profile page and unfollow button are manual X controls. This endpoint does the same from code, after approval.Unfollow Twitter accounts one request at a time
Create a new idempotency key whenever the relationship changes. Never reuse the key from an earlier follow action. Reuse the unfollow key only after an interrupted network request. Store the returned action ID, request hash, andstatusUrl from the response.
Poll the same action while terminal remains false.
Never submit a second write while the first action is active.
The endpoint accepts 1 target user ID per request.
It exposes no mass unfollow body or bulk unfollow feature.
Queue approved targets separately when you unfollow Twitter accounts in bulk.
Each row needs its own target, reason, approval, and idempotency key.
With separate rows, one failure does not affect other accounts.
A failed row must not erase the record of successful unfollow actions.
A team can stage approved rows for later processing.
Store each acting account and target ID separately.
Respect X’s terms of service and every returned rate limit.
Unfollow people only after a clear user or workflow decision.
Select inactive users before unfollowing
This write endpoint does not discover inactive users or non-followers. Read Following before selecting cleanup targets. Define inactivity from an approved timestamp or business rule. Never infer inactivity from a missing profile or stale export. Store the selection rule with the target user ID. Review the acting account and target as separate fields. Then send 1 approved unfollow action for each relationship.Verify the Twitter unfollow API result
PollstatusUrl until the action becomes terminal.
Store the final status, billing fields, and request identifiers.
Use Check Follower when you need current proof.
Check Following to confirm the target disappeared from the outbound list.
No response field says whether X sent a notification.
Do not claim whether X notified the target account.
Verify the relationship itself.
Choose unfollow or remove follower
Unfollow stops the connected account from following the target profile. Remove Follower ends one inbound relationship. Use Remove Follower when someone should stop following the connected account. Unretweet removes one repost and changes no follow relationship. Delete Tweet removes one post and changes no follow relationship. Keep these write actions in separate steps.Handle Twitter API unfollow errors
Fix the target user ID or acting account after400.
Replace Xquik authentication after 401. Reconnect after 403.
Add credits after 402. Review rejected input after 422.
Keep the original action after an idempotency conflict at 409.
Honor Retry-After after 429.
After 500 or 503, check safeToRetry before retrying.
Twitter unfollow API questions
How do I unfollow someone on Twitter with an API?
Approve the target user ID and connected account. Send this DELETE request, then poll the returned action until terminal.Can I mass unfollow or schedule unfollow actions?
Use your scheduler to queue 1 approved target per request. Throttle the queue to both documented limits above.Can I unfollow someone without them knowing?
Xquik cannot confirm whether X sends a notification. Confirm only the outbound relationship change.Do I need unfollow tools or browser extensions?
No. Use any HTTP client or the cURL, Node.js, Python, and Go examples. A third-party service still needs an approved connected account.How do I manage several connected accounts?
Repeat approval for each acting account. Never reuse one action ID across accounts.How do I get an API key?
Create an Xquik API key in the dashboard. You can also send an OAuth 2.1 bearer token.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
User to unfollow: user ID, username with or without
@, or URL-encoded profile URL, such as x.com/nasa.
An unknown username returns 422 x_target_not_found. See path IDs.Body
string
required
X username or account ID of your connected account to act as.
Response
Durable write recovery
- Store
id, the nestedhashinrequest,billing, andstatusUrl. - Poll after
Retry-AfterorpollAfterMswhenterminalisfalse. - Retry only when
safeToRetryistrue. - Use a new key when
nextAction.requiresNewIdempotencyKeyistrue.
200 terminal or 202 active
- 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. FollownextAction.