● On the roadmap

Post to X (Twitter) via API: the X API v2, handled for you (2026)

To post to X (Twitter) via API you use the X API v2 with OAuth 2.0 and the tweet.write scope. PostWire will handle the OAuth and posting so you publish to X with one REST call or one MCP tool — same shape as every other network.

How X (Twitter) posting works

X (formerly Twitter) exposes the X API v2. Posting requires OAuth 2.0 with the tweet.write scope and, depending on volume, a paid API tier. You authenticate each account, then create posts (text, with optional media).

PostWire will manage the OAuth, token refresh and posting so you publish to X the same way you publish everywhere else — one call.

Honest status

X is on the PostWire roadmap. The unified REST endpoint and MCP tool shape are already fixed, so when X ships it's a one-word change in your platforms array — no new SDK. Bluesky, Telegram, Mastodon and Discord are live today; create your free account now and you're ready the day X lands.

1. Connect a X (Twitter) account (OAuth)

X (Twitter) uses OAuth, not a password. Your user connects in the dashboard, or you generate the authorization URL via the API:

curl -X POST https://postwire.io/api/oauth/x/url \
  -H "Authorization: Bearer $POSTWIRE_API_KEY"
# -> { "url": "https://.../oauth/authorize?..." }
# The user opens the URL, approves, and PostWire stores the token (and refreshes it for you).

2. Publish with one REST call

Once connected, posting is a single request. Add more networks by putting more strings in platforms.

curl -X POST https://postwire.io/api/post \
  -H "Authorization: Bearer $POSTWIRE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platforms":["x"],"text":"Shipping PostWire today 🚀"}'

3. Or let an AI agent post it (MCP)

PostWire ships a first-class MCP server — not docs-only. Add it to any MCP client:

{
  "mcpServers": {
    "postwire": {
      "command": "npx",
      "args": ["-y", "postwire-mcp"],
      "env": { "POSTWIRE_API_KEY": "pw_live_xxx" }
    }
  }
}

Then the agent just calls the tool:

{
  "name": "post_to_social",
  "arguments": { "platforms": ["x"], "text": "Shipping PostWire today 🚀" }
}

X (Twitter) via API: build it yourself vs PostWire

 Direct integrationPostWire
Platform audit / reviewYou apply & maintain itHandled for you
OAuth + token refreshYou build itManaged
AI agent supportBuild your own toolMCP tool out of the box
Other networksOne integration each9 networks, one API

Pricing: flat per brand

PlanPriceBrands
Free$01 brand · 30 posts/mo
Starter$93 brands · 300/mo
Pro$2910 brands · 2,000/mo
Agency$9950 brands
Scale$299200 brands

Running 50 brands on Ayrshare costs roughly $779 — and its MCP is docs-only, so an agent can't actually post. See PostWire vs Ayrshare.

Get your API key — free →

FAQ

Can I post to X (Twitter) via API?
Yes. X exposes the X API v2 with OAuth 2.0 and the tweet.write scope. PostWire will wrap the OAuth and posting behind one REST call and one MCP tool, the same shape as every other network it supports.
Does the X API cost money?
X's API has free and paid tiers depending on volume and features. PostWire's own pricing stays flat per brand regardless. Check X's current developer terms for their API tier limits.
Is X live on PostWire yet?
Not yet — X is on the roadmap. The unified endpoint and MCP tool are already defined, so it's a one-word change when it ships. Bluesky, Telegram, Mastodon and Discord are live now.
How will an AI agent post to X?
Through PostWire's MCP server (postwire-mcp): the agent calls post_to_social with platforms set to x and the text. PostWire will handle the X API v2 OAuth and posting and return the result.
How much will posting to X cost on PostWire?
Flat per-brand pricing: Free $0 (1 brand, 30 posts), Starter $9, Pro $29, Agency $99 for 50 brands, Scale $299 — X included on paid plans when it launches.