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.

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/v1

Docs

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

Call POST /posts/preview with a caption, time, platforms: ["x"], and optional media. Full field reference is in the API docs.

Example X quote post
curl -s -X POST "https://postwing.io/api/v1/posts/preview" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "Adding my take",
  "scheduled_at": "2026-10-05T18:00:00Z",
  "targets": [
    {
      "account_id": "x-account-uuid",
      "platform_options": {
        "quote_tweet_url": "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 set platforms to x.

  • Schedule text, image, and video posts on X
  • Create native quote posts with quote_tweet_url
  • 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_tweet_url 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

Pass these on targets[].platform_options when you need more control.

  • quote_tweet_url tweet URL or status ID for a native quote post
  • reply_settings who can reply (everyone, following, mentionedUsers, and more)
  • Preview → confirm so nothing schedules without approval
  • API key or OAuth with scoped access

one API

Same API for every network

There is no separate X product. Pass platforms or targets[] on the same preview → confirm flow. 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/preview with the networks you want on that post

Confirm with the token. One key covers every platform PostWing supports.

questions

X posting API FAQ

Yes. Set targets[].platform_options.quote_tweet_url to a tweet URL or status 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