TwitterAPIs Docs
API ReferenceWrite Actions

Delete Draft Tweet API

Delete a draft owned by the account behind your registered session, identified by its id. The draft is removed from X's composer. Nothing was ever public, so this publishes nothing and retracts nothing. Billed at $0.0008 per call, the same as a standard read. Cost: $0.0008 per call.

POST draft/delete removes one draft from the account behind your registered twitterapis session. Pass the draft id from draft/list. It returns ok, deleted and the draft_tweet_id you named, and costs $0.0008 a call. A draft was never public, so deleting it retracts nothing and notifies nobody.

POST
/draft/delete

Authorization

bearerAuth
AuthorizationBearer <token>

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/draft/delete" \  -H "Content-Type: application/json" \  -d '{    "id": "2086650228950683648"  }'
{  "ok": true,  "deleted": true,  "draft_tweet_id": "2086650228950683648"}
{  "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

UnitPrice
Per call$0.0008
Per 1,000 calls$0.80

When to use

Use draft/delete to clear a draft your workflow has finished with, either because it was posted from X's composer or because it was rejected. Use tweet/delete instead when the post is already live, which is a different and irreversible operation.

Notes

  • A draft was never public. Deleting one is not a retraction and nobody is notified.
  • 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 delete drafts owned by the account behind the session.

FAQ

Is deleting a draft the same as deleting a tweet?

No. A draft has never been published, so removing it changes nothing anyone else can see. tweet/delete removes a live post and is the irreversible one.

How do I confirm the delete actually happened on X?

deleted and ok are the same signal on this endpoint: both say the call reached X and X answered success. They are not a re-read of your drafts. If you need proof the row is gone, call draft/list afterwards and check the id is absent.