Articles

Publish Article

Publish a draft article as the account behind your registered session, transitioning it from Draft to Published. WARNING: publishing posts a real, public announcement tweet on the account's timeline. This is not a preview or a private action, and it cannot be undone by re-editing the article: once published, the only way back is Delete Article, which unpublishes the article AND removes the announcement tweet. Requires a registered session. Billed at $0.0016 per call. Cost: $0.0016 per call.

post/article/publish

Request

  • Base URL: https://api.twitterapis.com/twitter
  • URL: https://api.twitterapis.com/twitter/article/publish
  • Auth: HTTP bearer

Request body

idstring required

The article's base64 entity id, returned by article/create or article/list (the id field, not rest_id).

audiencestring

Who can read the published article. Defaults to "Everyone" (X's own dialog default) when omitted.

reply_controlstring

Who can reply to the announcement tweet. Defaults to "Everyone" (X's own dialog default) when omitted.

captionstring

Optional caption text for the announcement tweet, up to 256 characters.

Example request

{
  "id": "QXJ0aWNsZUVudGl0eToyMDg2NjUwMjI4OTUwNjgzNjQ4",
  "audience": "Everyone",
  "reply_control": "Everyone",
  "caption": "New post: why we rebuilt our onboarding from scratch."
}

Response

Publish a draft article. This posts a real, public announcement tweet.

okboolean

True when the article was published.

articleobject

The published article, full shape: id, rest_id, title, preview_text, lifecycle (now Published), content_state, cover_media, media_entities, author, created_at_secs, modified_at_secs, first_published_at_secs (now set), visibility_setting (now Public), tweet_id (the new announcement tweet's id), public_url (https://x.com/i/article/<rest_id>).

Changes

No recorded changes to this operation across all 1 revision of this API.