X (Twitter)

Twitter Posting API

A posting API for X/Twitter, covering text, media, and thread posts.

Quick answer

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.

01

What does the posting surface actually cover?

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.
02

Media: images, video, and chunked upload

A post can carry up to 4 media items — images up to 5 MB or MP4 video up to 512 MB and 140 seconds. Anything larger, or any video/GIF at all, goes through X's chunked upload protocol under the hood. See X API Chunked Media Upload for the INIT/APPEND/FINALIZE/STATUS mechanics.
03

Threads (a connected run of posts)

X supports publishing a run of connected posts as a thread by chaining each new post's 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.
04

How do X API pricing and rate limits differ?

Since February 2026, X bills API usage per action rather than per subscription tier — a per-post charge, 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. See X API Pricing Tiers and X API Rate Limit for the current numbers, verified against X's own docs.
05

One request envelope for every platform

PostGate's point is that X doesn't need its own integration. The same 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.
Cross-platform in one callPostGate API
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.

Build it with PostGate

One API for every social platform your customers care about — sandboxed, documented, and ready today.

Start building Read the docs