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.
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/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": "X refused this resource for the acting account: on a read, the account is not a participant in the DM thread, the target is protected or has blocked it, or the session was attestation-blocked for calling from a datacenter or rotating IP; on a write, the account is not authorized for the action or has no logged-in session. The credentials are still valid, so do not re-register."}{ "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.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.
Related endpoints
- Create Article: Start a new draft article. No request body required.
- Update Article Content: Replace an article's body with a new Draft.js content_state.
- Publish Article: Publish a draft article. This posts a real, public announcement tweet.
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.
Create Article POST
Start a new draft Article as the account behind your registered session, and return its entity id, ready for Update Title / Update Content. The draft is empty until you call those. Requires a registered session. Billed at $0.0016 per call. Cost: $0.0016 per call.
Update Article Cover Image POST
Set the cover image on an article you own, identified by its entity id. This attaches media you have already uploaded; it does not upload anything itself, so call media/upload first and pass the media_id it returns. Requires a registered session. Billed at $0.0016 per call. Cost: $0.0016 per call.