Publish a tweet — plain text, reply, quote, poll, or with media — on behalf of the authenticated source user. Also supports editing an existing tweet within X’s edit window.
POST /2/tweets endpoint, routed through the AIsa gateway at https://api.aisa.one/apis/v1/twitter/post_twitter.
One endpoint covers every variant:
{ "text": "Hello, World!" }reply.in_reply_to_tweet_id.quote_tweet_id.poll.options + poll.duration_minutes.media.media_ids (1–4 IDs).edit_options.previous_post_id (within X’s edit window).POST /apis/v1/twitter/auth_twitter — AIsa stores the session against your API key and uses it automatically on every write call.tweet.read, tweet.write, users.read.mediapollquote_tweet_idcard_uri400 invalid-request) if more than one is set.
201 Created:
text reflects what X actually stored (e.g., shortened URLs). Use data.id to reference this tweet in subsequent calls (reply, quote, like, edit, delete).
edit_options.previous_post_id to edit an existing tweet instead of creating a new one. Edits are subject to X’s edit window and edit count limits; the endpoint returns 409 conflict if the window has passed or the edit quota is exhausted.
reply_settings:
| Value | Who can reply |
|---|---|
following | People you follow |
mentionedUsers | Users explicitly mentioned in the tweet |
subscribers | Your X Premium subscribers |
verified | Verified accounts |
400 invalid-request — set two mutually-exclusive fields, text too long, invalid poll duration, etc.403 client-forbidden — OAuth session missing the tweet.write scope. Re-link via auth_twitter.404 resource-not-found — referenced in_reply_to_tweet_id, quote_tweet_id, or previous_post_id doesn’t exist or isn’t visible to the source user.409 conflict — duplicate content, or edit outside the allowed window.Your AIsa API key. The authenticated source user (the account doing the follow) is determined by the OAuth session attached to your key.
The content of the tweet. Optional when posting media, a poll, or a quote tweet; required otherwise.
"Hello from AIsa — shipping agent-friendly Twitter APIs."
Post as a reply to another tweet.
Tweet ID to quote. Mutually exclusive with media, poll, and card_uri.
^[0-9]{1,19}$Attach media. Mutually exclusive with poll, quote_tweet_id, and card_uri.
Attach a poll. Mutually exclusive with media, quote_tweet_id, and card_uri.
Card URI. Mutually exclusive with media, poll, quote_tweet_id, and direct_message_deep_link.
Deep link that takes the conversation into a private DM.
Attach a place to the tweet.
Who is allowed to reply.
following, mentionedUsers, subscribers, verified Only visible to super followers.
Nullcast (promoted-only) tweet — not shown in the public timeline or to followers.
Marks the tweet as a paid partnership.
Flags the tweet as containing AI-generated media.
Post into the specified community.
^[0-9]{1,19}$Also share the community post with your followers.
Edit an existing tweet instead of creating a new one (subject to X's edit window).
Tweet created (or edited) successfully.