Articles
Publish Article
Publish an existing draft Twitter/X article to the timeline. $0.005 per call. Premium-only — the auth_token account must have X Premium.
POST
/twitter/article/publishThis endpoint costs $0.005 per API call. Premium-only — the auth_token account must have an active X Premium subscription. Non-Premium accounts will receive 403.
Publishes an existing draft. Use this if you saved the article first via /article/create with publish: false.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
auth_token | string | Yes | User's auth token (Premium account) |
ct0 | string | No | Optional current CSRF token cookie. When provided with twid, skips server-side credential resolution. |
twid | string | No | Optional current user ID cookie, for example u=1234567890. Must be provided with ct0. |
article_id | string | Yes | Draft article id |
proxy | string | No | Your proxy URL |
Notes
- If you already have current
ct0andtwid, send both to skip the extra server-side credential bootstrap fromauth_token. If either one is omitted, the server resolves them fromauth_tokenas before. Stale or invalid supplied values are not validated upfront and may fail on the actual Twitter action instead of returning an early401.
Response (200)
{
"status": "success",
"msg": "Article published successfully",
"data": {
"article_id": "2055606612363202560",
"tweet_id": "2055606621209002254",
"public_url": "https://x.com/i/status/2055606621209002254"
}
}Error Responses
403 - Not Premium
{ "error": "Publishing articles requires an active X Premium subscription on this account" }Examples
curl -X POST "https://api.getxapi.com/twitter/article/publish" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"auth_token": "your_auth_token",
"article_id": "2055606612363202560"
}'