Twitter / X API Reference

Post tweets with text, images, video, and GIFs via the Schedulala API.

Quick reference

authOAuth 2.0
text Limit280 characters
max Media4 images OR 1 video
media RuleImages and video cannot be mixed
max Video Duration2 min 20 s
entity SelectionNone
first CommentSupported — 280 chars (Premium limits apply per account); thread-target comments supported

Content types

Text

Up to 280 characters

Images

Up to 4 images per post. JPEG, PNG, GIF, WebP.

Video

1 video per post. MP4 or MOV. Max 512 MB.

GIF

Counts as video — only 1 per post

Carousel

Not supported

Media requirements

Constraints enforced by Twitter / X's API. Requests that violate these limits will be rejected.

ConstraintValue
Max image size5 MB
Max video size512 MB
Image formatsJPEG, PNG, GIF, WEBP
Video formatsMP4, QUICKTIME
Max video duration2 min 20 s
Image aspect ratio1:3 to 3:1
Min image dimensions4x4 px
Max media items4
GIF supportYes

Platform settings

Pass these fields inside platformSettings.twitter in the request body.

communityId
stringOptional

ID of a Twitter Community to post to. Omit for a regular tweet.

shareWithFollowers
booleanOptional

Whether to share a community post with your followers' timelines.

Default: true

Code examples

Basic post

curl -X POST https://schedulala.com/api/v1/posts \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Hello from the Schedulala API!",
"platforms": [
{ "platform": "twitter", "accountId": "acc_123" }
],
"publishNow": true
}'

Post with media

curl -X POST https://schedulala.com/api/v1/posts \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Check out these photos!",
"platforms": [
{ "platform": "twitter", "accountId": "acc_123" }
],
"mediaItems": [
{ "type": "image", "url": "https://example.com/photo1.jpg" },
{ "type": "image", "url": "https://example.com/photo2.jpg" }
],
"publishNow": true
}'

Quirks & gotchas

!

4 images OR 1 video per post — you cannot mix images and video.

!

GIFs count as video, so you can only include 1 GIF and no other media.

!

Minimum image dimensions: 4x4 px.

!

Image max: 5 MB. Video max: 512 MB.

!

WebP images are supported but may be re-encoded.

Related