Skip to main content

Quick reference

See also: Platform settings — X and Media uploads.

Before you start

X moved to Pay-Per-Use billing in February 2026 for new signups. Every tweet write is metered at 0.01(regular)or0.01 (regular) or 0.02 (write with URL). Postbreeze tracks this per-account and reports it via the Stripe meter.The first-comment feature on X doubles the cost per scheduled post — the main tweet + the self-reply are two separate writes.
The X access token is short-lived (~2 hours) but Postbreeze refreshes it transparently on a 30-minute tick. You don’t have to do anything other than connect once. Required scopes (already granted by the connect flow):
  • tweet.read, tweet.write, users.read, offline.access — base posting + refresh.
  • media.write — uploading images and videos.

Quick start

Workspace is inferred from your API key — no workspaceId argument. The flat shape (content + platforms) covers the common case; drop to the nested shape at the end of this page when you’d rather pass everything as targets.
SDK

With X-specific options

Set replySettings (or any other X field) under platformOptions on the target. The discriminator platform: "X" is required.

Content types

Single tweet

Plain text, plus up to 4 images OR 1 video.

Thread

Pass threadParts under platformOptions. content is the root tweet (the first one posted); each entry in threadParts is chained as a reply to the previous one, so threadParts[0] becomes the second tweet. Up to 25 parts, each ≤ 4,000 chars.

Reply

Pass replyToId (the tweet id you’re replying to). The post becomes a reply rather than a top-level tweet.

Media requirements

Images

Videos

For URL ingest vs pre-uploaded mediaIds, see Media uploads.

Platform-specific fields

Full reference: Platform settings — X.

First comment

Pass firstComment on the platform target. Postbreeze posts it as a self-reply to the root tweet — even in a thread, it always replies to content, not to the last threadParts entry.
Reply-settings conflict: if replySettings is following or mentionedUsers AND firstComment is set, the author can’t actually reply to their own tweet (X returns 400 Invalid reply settings). Postbreeze auto-relaxes the main tweet’s replySettings to everyone server-side when both are present — the X tab in compose shows a banner about this.

Analytics

Refresh cadence: every 12 hours. Gated behind X_ANALYTICS_ENABLED env on the Postbreeze server (off by default so deploys don’t accidentally bill the customer for analytics they didn’t ask for). When off, the analytics page shows a “warming up” banner.

Common errors

What you can’t do

  • ❌ Schedule via X’s native scheduler (we use our own queue)
  • ❌ Mix images and video in one tweet
  • ❌ Edit a tweet after publish (Premium feature; not exposed by the API)
  • ❌ Tag a location
  • ❌ Add a poll
  • ❌ Quote-tweet from a scheduled post (use replyToId for a reply chain instead)
  • ❌ Spaces (audio rooms) — not in the API

Full control: nested shape

If you’d rather use the nested request body (caption + targets instead of content + platforms), the same X options apply. Pick one shape per request — don’t mix.
Node.js