Postproxy × X (Twitter)

Publish tweets to X (Twitter) with automatic format detection. Handle images, videos, and text posts seamlessly.

One API call handles tweets with automatic content format detection.

Tweets

Publish tweets with automatic format detection

Media Support

Add up to 4 images or 1 video per tweet

Thread Support

Create threaded conversations with multiple tweets

Automatic Formatting

Content format determined automatically based on media

POST /v1/posts
Terminal window
curl -X POST "https://api.postproxy.dev/api/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": {
"body": "Just shipped a new feature! Check it out 🎉"
},
"profiles": ["twitter"],
"media": ["https://example.com/image.jpg"],
"platforms": {
"twitter": {}
}
}'

X (Twitter) Parameters

Formats

Format Description
post Tweet (default)

Media Constraints

Media Type Max Size Formats Max Count Duration
Image 5 MB jpg, png, webp, gif 4 -
Video 512 MB mp4, mov 1 1s - 140s

Notes

  • Text content: Optional
  • Media required: No
  • Mix video and image: No
  • Minimum image dimensions: 4x4 pixels
  • Minimum video dimensions: 32x32 pixels
  • Maximum text length: 280 characters (standard accounts)

View full documentation for all platform-specific features for X (Twitter)

Why Postproxy for X (Twitter)?

Skip Twitter API complexity

No need to handle Twitter API v2, OAuth flows, or rate limits. Postproxy handles it all.

Handle rate limits automatically

Twitter rate limits are managed automatically with intelligent retry logic.

Support all formats

Publish tweets with text, images, or videos through one unified API.

Supported formats:
Tweets

Reliable delivery

Automatic retries and clear status reporting ensure your tweets reach X.

How X (Twitter) Publishing Works with Postproxy

X's publishing model

X (formerly Twitter) uses a v2 API that requires OAuth 2.0 with PKCE for user-context authentication. Publishing a tweet is a single POST request, but media attachments require a separate multi-step upload flow through the v1.1 media endpoint — the v2 API still relies on v1.1 for media uploads. Postproxy handles this split: send your text and media URLs in one request, and the API manages the v1.1 media upload followed by the v2 tweet creation automatically.

Media uploads and format detection

X's media upload endpoint uses a chunked upload protocol for videos and GIFs over 5MB. Each chunk must be uploaded sequentially, with a finalize step at the end and optional status polling for async video processing. Images are simpler but still require a separate upload-then-attach flow. Postproxy detects the media type from your URLs, chooses the correct upload method, handles chunking for large files, and attaches the resulting media IDs to your tweet.

Common gotchas Postproxy handles for you

X has some of the strictest rate limits of any social platform — as low as 17 tweets per 24-hour window on free-tier API plans, with separate limits for media uploads. The API also has a 280-character limit for tweet text (with URLs counting toward the limit differently than plain text). Error responses from X are often vague, returning generic 403s for multiple distinct issues. Postproxy validates content length, manages rate limit windows, and translates X's error codes into actionable messages.

Threads and reply chains

Posting a thread on X requires creating each tweet sequentially, with each reply referencing the previous tweet's ID. If any tweet in the chain fails, you're left with a partial thread. Postproxy's thread support lets you send an array of tweet contents and handles the sequential posting with proper reply chaining, rolling back on failure so you don't end up with orphaned partial threads.

Frequently Asked Questions

Common questions about X (Twitter) integration

Are there any platform-specific parameters for Twitter?

No, X (Twitter) does not have custom parameters. Content format is determined automatically based on the media you provide. Postproxy handles all the formatting automatically.

What are the media constraints for Twitter?

Twitter supports images (jpg, png, webp, gif) up to 5 MB with a maximum of 4 images per tweet, and videos (mp4, mov) up to 512 MB with a duration between 1 second and 140 seconds.

What is the maximum text length for tweets?

Standard accounts have a 280 character limit for tweet text. Postproxy will automatically validate this limit before publishing.

Can I post text-only tweets?

Yes! Twitter fully supports text-only posts. Simply omit the media array from your post request.

Can I mix videos and images in a single tweet?

No, Twitter does not allow mixing videos and images in a single tweet. You can post up to 4 images or 1 video per tweet.

Ready to get started?

Start with our free plan and scale as your needs grow. No credit card required.