Skip to content

X create post API: POST /2/tweets

When PubNio calls X's create post request, POST /2/tweets: the scopes it needs, the errors PubNio handles for it, and its pinned spec revision.

PubNio calls X’s POST /2/tweets (createPosts) to create each post of an X delivery and every comment it sends. Values checked 2026-12-05.

How PubNio calls it

  • Publishing: POST /api/v1/posts (unless it saves a draft), POST /api/v1/posts/{postId}/publish, or POST /api/v1/posts/{postId}/targets/{targetId}/retry starts the delivery.
  • First comments: a post created with POST /api/v1/posts or sent with POST /api/v1/posts/{postId}/publish that carries a first comment gets it after the post publishes.
  • Comments: POST /api/v1/comments comments on or replies to a provider post through the same call.
  • A thread is one POST /2/tweets per post, in order: each later post sets reply.in_reply_to_tweet_id to the post before it. Only the first post carries the media, poll, reply settings, tagged users, and place.
  • Media is uploaded first and its IDs go in media.media_ids; a poll with media is refused before any call, because X takes one or the other.
  • PubNio passes X’s per-post API fee through at cost when a delivery publishes: $0.015, or $0.200 when the first post’s text contains an http:// or https:// link. It records one fee per delivery, priced on the first post.
Value Official value Source Checked
Create-post limit per user 100 per 15 minutes; another official page: 200 per 15 minutes X API Rate Limits 2026-12-05
Create-post limit per app 10,000 per 24h X API Rate Limits 2026-12-05

Scopes

  • The pinned spec lists 3 scopes, all required: users.read, tweet.write, and tweet.read.
  • PubNio’s X sign-in requests every one of them.
  • Before a delivery makes this call, PubNio checks that the account granted tweet.write.
  • Before a first comment goes out and before an agent’s comment goes out, PubNio checks that the account granted tweet.read, tweet.write, and users.read.

Errors

PubNio has no X error code pages yet. Provider error codes covers the providers that have them.

Spec and changes

createPosts in the pinned spec, revision 2.175.

Checked weekly; no change to POST /2/tweets recorded since this revision. Change tracker.

Limits

  • Only a throttle on the first post proves nothing was created, and PubNio retries it; a refusal fails the target, and a lost answer leaves it uncertain. A failure on a later post leaves a partial thread on X, and PubNio does not delete the posts that went out.
  • Quote posts are refused before any call: a delivery with quotePostId never reaches this operation.

Sources

Type to search…

↑↓ navigate↵ selectEsc close