Connect X first
- 01
Open Accounts in 1Post and choose Connect.
- 02
Pick X.
- 03
Sign in with X and approve access, or enter your own X developer keys.
- 04
Choose the account in 1Post. It is ready to pick in the composer.
Then GET /v1/accounts returns the id of the X account to use in the request.
Send a post to X
curl https://api.get1post.com/v1/posts \
-H "Authorization: Bearer $ONEPOST_API_KEY" \
-H "Idempotency-Key: x-first-post" \
-d '{"accounts":["ACCOUNT_ID"],"text":"Doors open at nine. Bring a friend.","schedule_at":"2026-11-02T15:00:00Z"}'The reply is 202 with the post (status scheduled) and one destination for X, which moves from queued to published or failed.
What you can send to X
- Text
- Up to 4 images, or 1 GIF, or 1 video
- Threads
- Polls
- Reply settings
- Community posts
- Labels for paid partnerships and generated media
What X publishes
- A post can contain up to 280 characters. Most characters count 1, emoji count 2, and every URL counts 23 however long it is.
- Creating posts through the API is limited to 100 per 15 minutes per user and 10,000 per 24 hours per app.
- Pay-per-use API pricing is $0.015 for a post and $0.200 for a post with a URL.
X rules the request is checked against
| Rule | What 1Post checks |
|---|---|
| Text limit | 280 characters, counted with X's weights: links count 23 and emoji 2 |
| Media accepted | Images, GIFs, Video |
| Images per post | 4 |
| Videos per post | 1 |
| Images and video together | Not in one post |
| GIF | Must be the only media in the post |
| Threads | Yes, as a chain of replies |
| First comment | Yes |
| Polls | 2 to 4 options of up to 25 characters; not together with media |
| Posts per day, per connected account (1Post) | 50 |
The same table with sources is on the X specs page.
X options in the request
- Thread: send parts instead of text. Each part is one post in the chain, up to 100 parts, and each is counted on its own.
- First comment: add first_comment with text to an account object, and delay_min if it should wait.
- Poll: 2 to 4 options of up to 25 characters, sent in the account's settings.
{
"accounts": [
"ACCOUNT_ID"
],
"parts": [
{
"text": "1/ The short version."
},
{
"text": "2/ The detail.",
"delay_min": 1
}
],
"use_next_free_slot": true
}Check the post before it is queued
Add "dry_run": true to test a post: nothing is kept, a valid one answers 200 and a broken one answers 422 naming the rule.
{
"error": {
"code": "invalid_for_platform",
"message": "x refuses this post: X counts 312 of 280 characters in part 1. (text_too_long).",
"fix": "Fix the rule named in the message and send the post again.",
"retryable": false,
"request_id": "REQUEST_ID"
}
}An assistant connected to the MCP server sends the same fields to create_post; set one up.