X Scheduling API
Queue X posts and threads for later. Each one goes out under the key that scheduled it.
- Schedule text, image, video and thread posts
- Exact times in ISO 8601
- Reschedule or cancel until it goes out
- Same limits, log and webhooks as posting now
const pk = new Postkey(process.env.POSTKEY_KEY);
await pk.posts.create({
accounts: [
"acc_x_789"
],
content: "We just shipped dark mode. Settings → Appearance.",
scheduledFor: "2026-12-01T09:00:00Z"
});- Xqueued
Queued for Dec 1, 09:00 UTC · key customer_42
Schedule your first X post
- 1
Connect X
Your customer signs in through X's own login. You get an account ID, never a password.
- 2
Make a key
Create a key for that customer or agent, scoped to their accounts, with the caps you choose.
- 3
Schedule
Add scheduledFor to the same request. It goes to X at that time, and a webhook tells you how it went.
Every X format, one endpoint
Pick a format to see the exact request with a publish time and what comes back. Options that only make sense on X sit under "x".
A plain post. The simplest call there is.
1POST https://api.postkey.dev/v1/posts2Authorization: Bearer pk_cust_42_…3Content-Type: application/json4 5{6 "accounts": [7 "acc_x_789"8 ],9 "content": "We just shipped dark mode. Settings → Appearance.",10 "scheduledFor": "2026-12-01T09:00:00Z"11}202 · scheduled
Queued under customer_42. It goes to X at the time you set.
{
"id": "post_3k9d2",
"status": "scheduled",
"scheduledFor": "2026-12-01T09:00:00Z",
"results": [
{
"account": "acc_x_789",
"platform": "x",
"status": "queued"
}
]
}Everything you need for X scheduling
Checked against X's rules
Before anything is sent, Postkey checks it against X's published limits:
One extra field
Every X format you can post now can be scheduled with scheduledFor. Nothing else changes.
Move or cancel
Change the time or cancel the post with one call before it goes out.
Checked when queued
Text and media are checked against X's rules when you schedule, so problems show up now.
Threads in one call
Send the replies as a list. Postkey posts them in order, each one replying to the last. If one fails, the rest stop and the webhook says which.
Media upload handled
Send a file or a URL. Postkey runs X's media upload, including the chunked flow for video, and attaches the result.
Also for X
Keys & control
Every X post has an owner
Each customer or agent posts to X through its own key: only its accounts, its own caps, its own log, and an off switch that touches nothing else.
Works with your stack
Your code
Node and Python SDKs with the same calls, or plain REST from anything that speaks HTTP.
- Node
- Python
- {}REST
No-code tools
Call the REST API from an HTTP step in n8n, Make or Zapier. Give each workflow its own key.
- n8n
- Make
- Zapier
AI agents & MCP
The MCP server lets Claude, Cursor and other agent tools post through their own key, with caps they can't change.
- MCP server
Beyond X
Same request shape on every platform. Add an account ID and the post goes there too.
- You're hereX Scheduling APIText · Image · Video · Thread
- Instagram Scheduling APIFeed post · Reel · Story · Carousel
- Facebook Scheduling APIText · Photo · Video
- TikTok Scheduling APIVideo · Photo
- LinkedIn Scheduling APIText · Image · Document
- YouTube Scheduling APIVideo
- YouTube Shorts Scheduling APIShort
- Pinterest Scheduling APIPin
- Google Business Scheduling APIUpdate post · Offer · Event
X scheduling questions
Something not here? Email hello@postkey.dev.
What can I post to X?
Text posts, posts with images, posts with a video, and threads. Each one is a single call to the same endpoint.
How do threads work?
Put the first post in content and the replies in a thread list. Postkey publishes them in order as replies. If one fails, it stops there and tells you which one and why.
Why do X posts count as more than one post?
X charges developers for posting through its API. Postkey passes that cost through as extra post credits for X only, and shows it per key.
Does Postkey check the length before sending?
Yes. Text and media are checked against X's published limits first, so you get a clear error instead of a failed post.
Can my customers connect their own X accounts?
Yes. They sign in with X's login screen. You get an account ID to post with and never see their password.
How do I schedule a X post?
Send the normal post request with scheduledFor in ISO 8601 (UTC or with an offset). You can cancel or move it until it goes out.
Schedule to X with a key per customer.
Get a key, connect an account, send the request above.
Free to start. Read the docs