Skip to content

Schedule X (Twitter) posts via API

Queue X posts and threads for later, in any time zone. Move or cancel them until they go out.

  • Schedule text, image, video and thread posts
  • A local time plus a time zone
  • Reschedule or cancel until it goes out
  • Same results, refunds and webhooks as posting now
post.tsnode
const pk = new Postkey(process.env.POSTKEY_API_KEY);

await pk.posts.create({
  content: "We just shipped dark mode. Settings → Appearance.",
  platforms: [
    {
      platform: "twitter",
      accountId: "int_x_789"
    }
  ],
  scheduledFor: "2026-12-01T09:00:00",
  timezone: "America/New_York"
});
  • Xqueued

Queued for Dec 1, 09:00 New York time

Schedule your first X post

  1. 1

    Connect X

    Your customer signs in through X's own login. You get an account ID, never a password.

  2. 2

    Get the account id

    List connected accounts. The id of the new account is the accountId you post with.

  3. 3

    Schedule

    Add scheduledFor and timezone 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 "twitter".

A plain post. The simplest call there is.

RequestREST
1POST https://api.postkey.dev/v1/posts2x-access-key: pk_live_…3Content-Type: application/json4 5{6  "content": "We just shipped dark mode. Settings → Appearance.",7  "platforms": [8    {9      "platform": "twitter",10      "accountId": "int_x_789"11    }12  ],13  "scheduledFor": "2026-12-01T09:00:00",14  "timezone": "America/New_York"15}
Response

202 · scheduled

Queued. It goes to X at the time you set, in that time zone.

{
  "success": true,
  "postId": "post_3k9d2",
  "status": "scheduled",
  "scheduledFor": "2026-12-01T14:00:00Z",
  "platforms": [
    {
      "platform": "twitter",
      "accountId": "int_x_789",
      "success": true
    }
  ]
}

Everything you need for X scheduling

  • Checked against X's rules

    Before anything is sent, Postkey checks it against X's published limits:

    Post length
    280 characters for standard accountssource
    Images per post
    Up to 4source
    Video length
    Up to 20 min for standard accounts, 125 min with Premiumsource
  • 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

PostingX Posting APIPost text, images, video and threads to X from your app, for every customer who connects an account.See the page

Built in

Connect, publish, get told

Your users connect X through a connect link. If X fails inside a multi-network post, the others still go out and the X credits come back.

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
    Read the docs
  • No-code tools

    Call the REST API from an HTTP step in n8n, Make or Zapier. One request posts to every network.

    • n8n
    • Make
    • Zapier
    Postkey with n8n
  • AI agents & MCP

    The MCP server lets Claude, Cursor and other agent tools publish and schedule posts, and read the results.

    • MCP server
    About the MCP server

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 threadItems. Postkey publishes them in order as replies. If one fails, it stops there and tells you which one and why.

Why do X posts cost more credits?

X charges developers for posting through its API, more for posts with a link. Postkey passes that cost through as extra credits for X only. Connect X through your own X app and an X post costs 1 credit.

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 and timezone. You can cancel or move it until it goes out.

Schedule to X for every customer.

Get a key, connect an account, send the request above.