TwitterAPIs Docs
API ReferenceArticles

Delete Article API

Delete an article you own, identified by its entity id. A Draft is hard-deleted directly. A Published article is unpublished first (reverting it to Draft) and then its announcement tweet is deleted, which is what makes it stop being publicly reachable, a two-step reversal for Publish Article. Pass lifecycle and tweet_id as optional fast-path hints when you already know them (from a prior list/create response); omitted, the server resolves them itself by scanning your Draft then Published lists, costing a couple of extra round trips. Requires a registered session. Billed at $0.0008 per call. Cost: $0.0008 per call.

POST article/delete removes an article you own on twitterapis.com. If the article is a draft, it is hard-deleted immediately. If it is published, the endpoint first unpublishes it, then deletes its announcement tweet. It requires a registered session, costs $0.0008 per call, and returns ok, deleted, and the article id.

POST
/article/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/article/delete" \  -H "Content-Type: application/json" \  -d '{    "id": "QXJ0aWNsZUVudGl0eToyMDg2NjUwMjI4OTUwNjgzNjQ4"  }'
{  "ok": true,  "deleted": true,  "id": "QXJ0aWNsZUVudGl0eToyMDg2NjUwMjI4OTUwNjgzNjQ4"}
{  "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 this endpoint when you need to permanently remove an article you own, whether it is still a draft or already published. Reach for it instead of article/unpublish when the goal is full removal rather than just taking a published article offline while keeping it as an editable draft.

Notes

  • [VERIFY] The draft hard-delete response (a plain "Done" string on success) is captured verbatim and high-confidence; the published-article branch chains through Unpublish (request shape ASSUMED) plus the existing tweet/delete op, so end-to-end confidence on that branch is lower. Not executed live end-to-end.
  • For a Draft: hard-deleted directly, one call.
  • For a Published article: unpublished first (back to Draft), then its announcement tweet is deleted. If the announcement tweet cannot be resolved after unpublishing, deleted comes back false even though the article is no longer public as an article, a partial-completion case worth checking for.
  • Pass lifecycle and tweet_id when you already have them (they save a couple of round trips); omitting both is safe but costs extra lookups, each bounded to the first 100 items of each lifecycle.
  • Needs a session for the account you are deleting 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.
  • List Articles: List your own articles, filtered by lifecycle (draft or published).
  • Unpublish Article: Revert a published article back to Draft. The announcement tweet is left in place.
  • Publish Article: Publish a draft article. This posts a real, public announcement tweet.

FAQ

What happens to the announcement tweet when I delete a published article?

The endpoint unpublishes the article first, then deletes the tweet that announced it. Both steps happen as part of the same call, so you do not need to call twitter_delete_tweet separately for the announcement.

Do I need to know whether the article is a draft or published before calling this?

No, the id alone is enough since the endpoint detects the article's state and branches accordingly. You can optionally pass lifecycle (draft or published) and, for a published article, tweet_id as fast-path hints so the API skips a lookup, but they are not required.