Quick reference
See also: Platform settings — X and Media uploads.
Before you start
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 — noworkspaceId 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
SetreplySettings (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
PassthreadParts 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
PassreplyToId (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
PassfirstComment 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.
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
replyToIdfor 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