Posting to X through the API
Short, fast and unforgiving of padding. The request shape is the same one every network here uses — only the limits on this page change.
X publishes for anyone today. Connect an account and the request below works as written.
Connecting a X account
Needs an X developer app on a paid tier to post. Once connected, we hold the credential and keep it alive; your code only ever sends the API key.
The limits we enforce before publishing
Caption
280 characters. Over the limit comes back as a 422 before anything publishes.
Media
Up to 4 per post. Media optional.
Video
0.5s to 2m 20s, up to 512 MB.
Cadence
12 posts a day per account — the ceiling that stays under X's spam heuristics.
What pre-flight rejects, verbatim
A request that breaks a X rule comes back as a 422 naming the network and the number — before anything is scheduled, not after the other networks published. The error strings are these:
412 chars — X allows 280.6 attachments — X allows 4.Video is 4m 40s — X allows 2m 20s.
The request
curl -X POST https://attentionpilot.com/api/v1/posts \
-H "Authorization: Bearer $PILOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Written for X, under 280 characters.",
"accounts": ["x"]
}'Omit schedule for the next free queue slot, send "now" to publish immediately, or send an ISO timestamp.
When X fails
Each network is delivered on its own. A revoked token or a rejected upload on X never blocks your other targets: the post returns "partial", the X target carries the error text, and you can retry just this delivery.
Worth knowing
- ✓280 characters, checked before you schedule
- ✓Up to 4 images or one video per post
- ✓Video up to 2m20s
The same call reaches the rest
Posting to X is an API call.
Start freeOne account free. No card.