Cancel Scheduled Tweet API
Cancel a scheduled tweet on the account behind your registered session, identified by its id, so it never posts. Do this before execute_at: once the post has gone out it is an ordinary tweet and tweet/delete is what removes it. Billed at $0.0008 per call, the same as a standard read. Cost: $0.0008 per call.
POST scheduled/delete cancels one scheduled tweet on the account behind your registered twitterapis session so it never posts. Pass the id from scheduled/list or from scheduled/create. It returns ok, deleted and the scheduled_tweet_id you named, for $0.0008 a call. After execute_at, use tweet/delete instead.
Authorization
bearerAuth Pass your API key as a bearer token on every request: Authorization: Bearer <API_KEY>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/scheduled/delete" \ -H "Content-Type: application/json" \ -d '{ "id": "2086650228950683649" }'{ "ok": true, "deleted": true, "scheduled_tweet_id": "2086650228950683649"}{ "error": "bad_request", "message": "Missing or malformed parameter. Fix the request before retrying."}{ "error": "unauthorized", "message": "The API key is missing, malformed, or revoked. Check the Authorization header."}{ "error": "insufficient_credits", "message": "Your balance is exhausted. Top up your credits to continue."}{ "error": "forbidden", "message": "The acting account is not authorized for this write action, or has no logged-in session."}{ "error": "not_found", "message": "The resource does not exist, for example a deleted tweet or a private account."}{ "error": "rate_limited", "message": "Too many requests. Back off and retry with exponential backoff."}{ "error": "server_error", "message": "Something failed on our side. Retry with backoff; if it persists, contact support."}Pricing
| Unit | Price |
|---|---|
| Per call | $0.0008 |
| Per 1,000 calls | $0.80 |
When to use
Use scheduled/delete when a queued post should not go out, for example because the announcement slipped or the copy changed. It only works while the post is still pending; after it has published, the thing you want is tweet/delete.
Notes
- Cancel before execute_at. After the post has published this endpoint has nothing to cancel; use tweet/delete on the resulting tweet.
- Needs a session for the account you are acting as: either register one once (POST /customer/session), or pass per-call inline credentials as x-auth-token and x-ct0 request headers, which let a single API key act as many accounts. Returns 409 session_required if neither is supplied, 401 session_dead when the session has expired.
- You can only cancel scheduled posts owned by the account behind the session.
Related endpoints
- Schedule Tweet: Schedule a tweet to post publicly at a future instant.
- List Scheduled Tweets: List the posts queued to publish on your own account.
- Delete Tweet: Delete one of your registered account's tweets by ID or status URL.
FAQ
What happens if I call this after the post already went out?
There is no longer a scheduled row to cancel, so the call cannot retract the tweet. Delete the published tweet with tweet/delete instead, using the tweet's own ID.
How do I confirm the cancel actually happened?
deleted and ok are the same signal here: both say the call reached X and X answered success, not that your queue was re-read. If you need proof, call scheduled/list afterwards and check the id is absent.
Schedule Tweet POST
Schedule a tweet from the account behind your registered session for a future instant. Unlike a draft, this WILL post publicly at execute_at unless you delete it first. execute_at is epoch SECONDS and must be in the future; a millisecond value is refused by name rather than scheduled tens of thousands of years out. Billed at $0.0016 per call. Cost: $0.0016 per call.
List Scheduled Tweets GET
List every pending scheduled post on the account behind your registered session. Each row carries the id, its text, its execute_at in epoch SECONDS, X's own state label, and thread_truncated for a thread whose text is only its first tweet. Ordering is X's: pass ascending=true to ask for the oldest first. Billed at $0.0016 per call. Cost: $0.0016 per call.