Create Article API
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.
POST article/create starts a new draft Twitter/X Article under the account behind your registered session. It requires no parameters and returns an ok boolean plus an article object with the new draft's id, rest_id, null title, empty preview_text and content_state, and lifecycle set to Draft. Costs $0.0016 per call.
Authorization
bearerAuth Pass your API key as a bearer token on every request: Authorization: Bearer <API_KEY>.
In: header
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/create"{ "ok": true, "article": { "id": "QXJ0aWNsZUVudGl0eToyMDg2NjUwMjI4OTUwNjgzNjQ4", "rest_id": "2086650228950683648", "title": null, "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": 1786400000, "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
| Unit | Price |
|---|---|
| Per call | $0.0016 |
| Per 1,000 calls | $1.60 |
When to use
Call this to start a brand-new draft Article before writing anything into it: it takes no request body and returns only the entity id and rest_id that Update Title and Update Content need. Use it once per new Article; to resume an existing draft, use Get Article or List Articles instead, not this endpoint.
Notes
- [VERIFY] Request variables inferred (X never captured DraftCreate's own request), response shape sourced from a live capture; not executed live end-to-end.
- Needs a session for the account you are creating 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.
- The returned article.id (not rest_id) is what you pass as id to Update Title, Update Content, Publish, Unpublish, and Delete.
- The draft has no title and empty content until you call Update Title and Update Content.
Related endpoints
- Update Article Title: Set the title on a draft or published article.
- Update Article Content: Replace an article's body with a new Draft.js content_state.
- List Articles: List your own articles, filtered by lifecycle (draft or published).
FAQ
Do I need to send a title or body when creating the article?
No. article/create takes no request parameters at all. The returned draft starts with title set to null, content_state empty, and preview_text empty. You fill those in afterward with separate Update Title and Update Content calls.
How do I continue editing after this call returns?
Read article.id (or article.rest_id) from the response and pass it as the target for Update Title and Update Content. The new draft's lifecycle field comes back as Draft, and it stays in that state until you call Publish Article.
Overview
Articles: Create, edit, publish, and read X's long-form Articles (X's internal name: Notes). Publishing posts a real announcement tweet; reading a published article is a public call that needs no session.
Update Article Title POST
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.