X API

X posting API for developers and agents

Schedule posts and native quote tweets on X from one REST API. Built for scripts, custom apps, and AI agents.

  • 7-day free trial
  • Posts + quotes
  • Plans from $9.99/mo

step by step

How to post to X with the API

Create a key, connect X, then schedule a post.

Open the step-by-step guide

01Create an API key

Open Dashboard → AI & API, create a key, and send it as Authorization: Bearer pw_live_…. Connect your X account if you have not already.

Endpoints

API base URL

https://postwing.io/api/v2

Docs

https://postwing.io/docs
02Schedule to X

Call POST /posts with a caption, a time, your X account id from GET /accounts, and optional media. Full field reference is in the API docs.

Example X quote post
curl -s -X POST "https://postwing.io/api/v2/posts" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "Adding my take",
  "scheduled_at": "2026-10-05T18:00:00Z",
  "accounts": [
    {
      "id": "X_ACCOUNT_ID",
      "options": {
        "quote_post": "https://x.com/someone/status/1234567890"
      }
    }
  ]
}'

what you can do

X posting from one API

Same PostWing API as the full product, scoped to X when you post to a X account.

  • Schedule text, image, and video posts on X
  • Create native quote posts with quote_post
  • Control reply settings when you need them
  • Upload media with a direct upload URL
  • Edit or cancel scheduled X posts from the same API

built for X

Posts and native quotes in one flow

Set a caption, optional media, pick a time, and target X. Use quote_post for a real quote post, not a plain link in the caption.

  • Images and video attach like a normal post
  • Native quote posts from a tweet URL or ID
  • Scheduled posts show up on your PostWing calendar

X options

Platform settings that matter

Set these on accounts[].options when you need more control.

  • quote_post post URL or ID for a native quote post
  • who_can_reply everyone, following, mentioned, subscribers, or verified
  • Clear errors with a code and the exact field to fix
  • API key or OAuth with scoped access

one API

Same API for every network

There is no separate X product. List more account ids in accounts on the same call. Add Instagram, TikTok, YouTube, LinkedIn, X, Facebook, Pinterest, or Threads without changing your integration.

  • X (Twitter)
  • Instagram
  • Facebook
  • TikTok
  • Threads
  • Pinterest
  • LinkedIn
  • YouTube

Connect accounts once in PostWing (or via the accounts endpoints)

Call POST /posts with every account you want on that post

It is on your calendar. One key covers every platform PostWing supports.

questions

X posting API FAQ

Yes. Set accounts[].options.quote_post to a post URL or ID. That creates a native quote post, not a plain link in the caption.

ready when you are

Schedule your next X post from the API

Create an API key, connect X, and schedule posts or quote tweets from your app.

7-day free trial · Cancel anytime