Networks

X (Twitter) posting API

X: open today, billed from a prepaid credit at X's own USD prices. Siar, a unified social media API, publishes posts, threads, polls and replies to X with one REST request: list TWITTER in socialAccountTypes and put the X (Twitter) payload under data.TWITTER. Add other networks to the same request to post to all of them at once.

Status checked 12 November 2026 against Siar's approval records. Each network's status, and X (Twitter)'s approval record.

How to post to X (Twitter) via API

Send POST /post with your API key in x-api-key. Add thread for a thread, poll for a poll, or quoteTweetId to quote. Each X call is paid from your prepaid X credit. A request that breaks one of X (Twitter)'s rules gets a 400 with an issues entry before anything is sent.

Example request
curl -X POST "https://api.siaran.my/api/v1/post" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "title": "X (Twitter) post",
    "postDate": "2026-11-20T09:00:00.000Z",
    "status": "SCHEDULED",
    "socialAccountTypes": [
      "TWITTER"
    ],
    "data": {
      "TWITTER": {
        "text": "Version 2.4 is out: bulk exports and a new calendar view."
      }
    }
  }'
Example response (200)
{
  "id": "POST_ID",
  "teamId": "TEAM_ID",
  "organizationId": "ORGANIZATION_ID",
  "title": "X (Twitter) post",
  "referenceKey": null,
  "postDate": "2026-11-20T09:00:00.000Z",
  "postedDate": null,
  "status": "SCHEDULED",
  "data": {
    "TWITTER": {
      "text": "Version 2.4 is out: bulk exports and a new calendar view."
    }
  },
  "error": null,
  "errors": null,
  "errorsVerbose": null,
  "externalData": null,
  "retryCount": 0,
  "createdAt": "2026-11-12T08:00:00.000Z",
  "updatedAt": "2026-11-12T08:00:00.000Z",
  "deletedAt": null,
  "firstComment": null
}

The post is stored as SCHEDULED. At postDate Siar publishes it, and a signed post.published webhook reports the result when the post reaches a final state. Read it any time with GET /post/{id}.

X (Twitter) fields

  • text string nullable
  • uploadIds string[] nullable
  • mediaItems object[] nullable
    2 fields
    • uploadId string required
    • altText string nullable max length 1,000
  • replySettings string nullable
    One of: EVERYONE FOLLOWING MENTIONED_USERS SUBSCRIBERS VERIFIED
  • poll object nullable
    2 fields
    • options string[] required min 2 itemsmax 4 itemseach: min length 1each: max length 25
    • durationMinutes integer required ≥ 5≤ 10080
  • quoteTweetId string nullable
  • replyToTweetId string nullable
  • subscribersOnly boolean nullable
  • thread object[] nullable max 25 items
    2 fields
    • text string nullable max length 25,000
    • uploadIds string[] nullable
  • tweetStorm boolean nullable
  • tweetStormNumbering boolean nullable
  • isAiGenerated boolean nullable default false

What Siar can do on X (Twitter)

Comments and repliesYes
First commentYes
Edit a published postNo
Delete a published postYes
Edit a commentNo
Delete a commentYes
Import commentsYes
Post analyticsYes
Account analyticsYes
Post history importYes
Direct messagesNo

Siar can create comments and replies up to 280 characters, and import the comments people leave on your posts.

X (Twitter) API limits

X bills API use per request with no subscription: creating a post costs $0.015, and a post with a URL $0.200. X blocks requests once a spending limit or the credit balance is reached.Source: X, pricing, checked 12 November 2026.

Siar's daily caps

Per connected account, per UTC dayFreeStarter and ProBusiness
Posts51515
Comments31515

Monthly post quotas are on pricing. Enterprise uses the Business caps unless agreed otherwise.

Text and media rules Siar checks before sending

ConnectionOAuth 2.0 in the browser
ChannelNot needed
Post typespost, thread
Text length280 characters
Comment length280 characters
Media per postUp to 4

Media rules

KindFormatsMax sizeDurationOther
Imagejpeg, png, webp, gif15 MBn/aNone
Videomp4, mov8 GB0.5 s to 20 minNone

X (Twitter) API scopes

Siar sends the user to the network's consent page and stores the tokens it gets back, refreshing them before they expire. Use POST /social-account/connect from your own UI, or send your customer a hosted link from POST /social-account/create-portal-link; see connecting accounts.

Siar requests only these scopes at connect time:

  • tweet.read
  • tweet.write
  • users.read
  • offline.access
  • media.write
  • like.read
  • like.write
  • tweet.moderate.write

X pricing

X bills each API call, so these actions are paid from a prepaid credit balance at X's own USD prices. Organizations billed in Malaysia buy credit in ringgit; the rate is shown before you pay. Everything not listed is free.

ActionBilledUSD
Publish a post or replyper request$0.015
Publish a post that contains a linkper request$0.200
Read a post (analytics, comment import)per post returned$0.005
Look up another accountper account returned$0.010
Edit or manage existing contentper request$0.005
Delete a post or replyper request$0.010
Repost, like or followper request$0.015

X (Twitter)-specific operations

These exist for X (Twitter) only and live under /misc/twitter.

OperationEndpoint
Delete a Twitter/X tweetDELETE /misc/twitter/tweet
Delete a Twitter/X commentDELETE /misc/twitter/comment
Repost a Twitter/X postPOST /misc/twitter/retweet
Undo a Twitter/X repostDELETE /misc/twitter/retweet

X (Twitter) MCP

TypeScript SDK, CLI and MCP server (version 0.1.0), built from the same OpenAPI contract. Not on npm yet. The MCP server exposes the same operations as the REST API, so an agent can post to X (Twitter) through it with the same payload as above. Because it is not on npm yet, there is no install command to copy; the SDK, CLI and MCP page says what exists today.

X (Twitter) API error codes

When X (Twitter) says no, Siar keeps X (Twitter)'s own code and message on the post, word for word, with a plain-English fix and a retry verdict. The reference covers 13 X (Twitter) errors. X (Twitter) API error codes and how to fix them.

X (Twitter) API questions

What can I post to X (Twitter) through the API?

post, thread. Posts, threads, polls, quotes and replies on X. Because X bills API usage per call, X actions draw from a prepaid credit at X's own USD prices.

How many X (Twitter) posts can I publish per day?

Siar caps posts per connected account and UTC day: 5 on Free, 15 on Starter and Pro, 15 on Business. X (Twitter)'s own limits also apply; they are on this page with their source.

Can I schedule X (Twitter) posts?

Yes. Set postDate in the future and a status of SCHEDULED. Siar publishes at that time and sends a signed post.published webhook when the post reaches a final state.

How do I connect a X (Twitter) account?

Any X account. X charges for API usage, so X actions draw from a prepaid credit balance. Siar sends the user to the network's consent page and stores the tokens it gets back, refreshing them before they expire.

What happens when X (Twitter) rejects a post?

The post keeps X (Twitter)'s own code and message, with a fix. The X (Twitter) API error codes and how to fix them page explains 13 common rejections and what to do.

Building on more than X (Twitter)? Siar publishes to Facebook, Instagram, Threads, X, LinkedIn profiles, Bluesky, Mastodon, Discord and Slack today. See the social media posting API and the social media scheduling API.

Other networks

TikTok API · YouTube API · Instagram API · Facebook API · Threads API · LinkedIn API · Pinterest API · Reddit API · Mastodon API · Discord API · Slack API · Bluesky API · Google Business Profile API · Snapchat API

Your first post is one request away.

Start with 20 free posts to try. No card. A one-time allowance, with no time limit.