TwitterAPIs Docs
API ReferenceArticles

Update Article Title API

Set the title of an article you own, identified by its entity id. Requires a registered session. Billed at $0.0016 per call. Cost: $0.0016 per call.

POST article/update_title sets the title on an X article you own, specified by its base64 entity id. It accepts the article id and a new title string, updates the article, and returns ok (boolean) plus the full updated article object. Works on both draft and published articles. Requires a registered session and costs $0.0016 per call.

POST
/article/update_title

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/update_title" \  -H "Content-Type: application/json" \  -d '{    "id": "QXJ0aWNsZUVudGl0eToyMDg2NjUwMjI4OTUwNjgzNjQ4",    "title": "Why we rebuilt our onboarding from scratch"  }'
{  "ok": true,  "article": {    "id": "QXJ0aWNsZUVudGl0eToyMDg2NjUwMjI4OTUwNjgzNjQ4",    "rest_id": "2086650228950683648",    "title": "Why we rebuilt our onboarding from scratch",    "preview_text": "",    "lifecycle": "Draft",    "content_state": {      "blocks": [],      "entityMap": []    },    "cover_media": null,    "media_entities": [],    "author": {      "id": "44196397",      "username": "elonmusk",      "name": "Elon Musk"    },    "created_at_secs": 1786400000,    "modified_at_secs": 1786400120,    "first_published_at_secs": null,    "visibility_setting": null,    "tweet_id": null,    "public_url": null  }}
{  "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.0016
Per 1,000 calls$1.60

When to use

Use this endpoint when you need to rename an article you already created, whether it is still a draft or already published, without touching its body content. Reach for article/update_content instead if you need to change the article body, or article/create if the article does not exist yet.

Notes

  • [VERIFY] Request variable names inferred from the response field names and the entity id shape; not executed live end-to-end.
  • Needs a session for the account you are writing 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.
  • Works on both a draft and an already-published article.

FAQ

Can I update the title of a published article, or only a draft?

Both. The endpoint sets the title on an article you own regardless of its draft or published state, so no unpublish step is required first.

Where do I get the id value to pass in?

The id parameter is the article's base64 entity id, the same identifier returned in the article object from article/create or article/list. It is not the article's URL slug or a numeric id.

What does a successful call return?

A response with ok set to true and an article object containing the updated article, including the new title. If ok is false, the title was not changed.