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.
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."
}
}
}' {
"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
-
textstring nullable -
uploadIdsstring[] nullable -
mediaItemsobject[] nullable2 fields
-
uploadIdstring required -
altTextstring nullable max length 1,000
-
-
replySettingsstring nullableOne of:EVERYONEFOLLOWINGMENTIONED_USERSSUBSCRIBERSVERIFIED -
pollobject nullable2 fields
-
optionsstring[] required min 2 itemsmax 4 itemseach: min length 1each: max length 25 -
durationMinutesinteger required ≥ 5≤ 10080
-
-
quoteTweetIdstring nullable -
replyToTweetIdstring nullable -
subscribersOnlyboolean nullable -
threadobject[] nullable max 25 items2 fields
-
textstring nullable max length 25,000 -
uploadIdsstring[] nullable
-
-
tweetStormboolean nullable -
tweetStormNumberingboolean nullable -
isAiGeneratedboolean nullable default false
What Siar can do on X (Twitter)
| Comments and replies | Yes |
|---|---|
| First comment | Yes |
| Edit a published post | No |
| Delete a published post | Yes |
| Edit a comment | No |
| Delete a comment | Yes |
| Import comments | Yes |
| Post analytics | Yes |
| Account analytics | Yes |
| Post history import | Yes |
| Direct messages | No |
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 day | Free | Starter and Pro | Business |
|---|---|---|---|
| Posts | 5 | 15 | 15 |
| Comments | 3 | 15 | 15 |
Monthly post quotas are on pricing. Enterprise uses the Business caps unless agreed otherwise.
Text and media rules Siar checks before sending
| Connection | OAuth 2.0 in the browser |
|---|---|
| Channel | Not needed |
| Post types | post, thread |
| Text length | 280 characters |
| Comment length | 280 characters |
| Media per post | Up to 4 |
Media rules
| Kind | Formats | Max size | Duration | Other |
|---|---|---|---|---|
| Image | jpeg, png, webp, gif | 15 MB | n/a | None |
| Video | mp4, mov | 8 GB | 0.5 s to 20 min | None |
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.readtweet.writeusers.readoffline.accessmedia.writelike.readlike.writetweet.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.
| Action | Billed | USD |
|---|---|---|
| Publish a post or reply | per request | $0.015 |
| Publish a post that contains a link | per request | $0.200 |
| Read a post (analytics, comment import) | per post returned | $0.005 |
| Look up another account | per account returned | $0.010 |
| Edit or manage existing content | per request | $0.005 |
| Delete a post or reply | per request | $0.010 |
| Repost, like or follow | per request | $0.015 |
X (Twitter)-specific operations
These exist for X (Twitter) only and live under /misc/twitter.
| Operation | Endpoint |
|---|---|
| Delete a Twitter/X tweet | DELETE /misc/twitter/tweet |
| Delete a Twitter/X comment | DELETE /misc/twitter/comment |
| Repost a Twitter/X post | POST /misc/twitter/retweet |
| Undo a Twitter/X repost | DELETE /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.