step by step
How to post to X with the API
Create a key, connect X, then schedule a post.
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/v1Docs
https://postwing.io/docsCall POST /posts/preview with a caption, time, platforms: ["x"], and optional media. Full field reference is in the API docs.
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_urltweet URL or status ID for a native quote postreply_settingswho 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)
- TikTok
- Threads
- 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.