Twitter Posting API
A posting API for X/Twitter, covering text, media, and thread posts.
PostGate’s X/Twitter posting surface supports creating and deleting posts and reading post-level analytics through the same POST /api/posts envelope used for every platform. A post carries up to 4 media items (images up to 5 MB, MP4 up to 512 MB and 140 seconds). Since February 2026 X bills per action, with rate limits as a separate system.
The platform has been called X since 2023, but “Twitter API” is still how most developers search for it, and the underlying endpoints still live at api.twitter.com and api.x.com interchangeably. This page is the overview of what a posting integration for X/Twitter needs to handle — connection, text, media, threads, pricing, and rate limits — with a link out to a dedicated page for each. If you just want the single request to publish one post, see X API: Post a Tweet.
What does the posting surface actually cover?
Media: images, video, and chunked upload
Threads (a connected run of posts)
in_reply_to_tweet_id to the previous one. PostGate's unified post.thread field implements this pattern generically, but as of this writing it's wired up for Meta Threads profiles only — sending thread items against an X profile returns a 422. See X Thread API for the exact mechanics and the current workaround.How do X API pricing and rate limits differ?
One request envelope for every platform
POST /api/posts call that publishes to Instagram or LinkedIn publishes to X — only the profile ID and, optionally, platform-specific fields under post.options.x change.curl -X POST "https://postgate.studio/api/posts?profile_group_id=grp_acme123" \
-H "Authorization: Bearer $POSTGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": { "body": "Shipping something new today." },
"profiles": ["pro_x123", "pro_linkedin456", "pro_instagram789"],
"media": ["https://cdn.example.com/launch.jpg"]
}'Frequently asked questions
Is the Twitter API the same as the X API?
Yes. The platform has been called X since 2023, but “Twitter API” is still how most developers search for it, and the underlying endpoints still live at api.twitter.com and api.x.com interchangeably.
Can I read comments or send messages through the X integration?
No. Through PostGate, an X profile supports creating and deleting posts and reading post-level analytics. It does not currently support reading comments, sending messages, or a background token refresh — X access tokens don’t expire on their own, so refresh isn’t needed unless the user revokes access on X’s side.
Does PostGate support X threads?
X supports thread chaining by setting each new post’s in_reply_to_tweet_id to the previous one, and PostGate’s unified post.thread field implements this pattern generically — but as of this writing it’s wired up for Meta Threads profiles only. Sending thread items against an X profile returns a 422.
How is X API usage billed now?
Since February 2026, X bills API usage per action rather than per subscription tier — a per-post charge and a per-read charge, separate for your own data versus someone else’s. Rate limits (a request-count ceiling per time window) are a separate, independent system layered on top.
