X (Twitter) MCP server
259 operations0 webhooks
Read and act on X (Twitter) through the full X API v2: publish and search posts, read timelines, mentions, likes, bookmarks and followers, look up and search users, send and read Direct Messages and encrypted Chat, manage Lists, Spaces, Communities, trends, news, Community Notes, live broadcasts and media uploads, and run usage, compliance and webhook routes (259 operations).
Try X (Twitter) with your agent
Connect X (Twitter), then paste this into Claude, ChatGPT or Cursor. For ideas from other apps, see the use cases.
Using Corsair, show me what you can do in X (Twitter) on my account, then run one read-only example and show me the result.
X (Twitter) tools and triggers
Tools are what your agent can do in X (Twitter) through Corsair's MCP server. Triggers are the X (Twitter) events a routine can start from.
Users
- AffiliatesRead-only
Retrieves a list of Users who are affiliated with a specific organization User by their ID.
users.affiliates
- Block DmsWrite
Blocks direct messages to or from a specific User by their ID for the authenticated user. Needs a user (OAuth 2.0) token.
users.blockDms
- Blocking.BlockDestructive
Causes the source User to block the target User. A block also removes any follow between the two Users, in both directions, and unblocking does not restore it. Each call blocks one account: block only accounts the authenticated User named or approved, because finding or reviewing accounts is not approval to block them. Needs a user (OAuth 2.0) token.
users.blocking.block
- Blocking.ListRead-only
Returns the Users that the given User is blocking. Needs a user (OAuth 2.0) token.
users.blocking.list
- Blocking.UnblockWrite
Causes the source User to unblock the target User. Unblocking does not restore any follow the block removed, so blocking and then unblocking a follower removes them as a follower: do that only for followers the authenticated User approved removing. Needs a user (OAuth 2.0) token.
users.blocking.unblock
- Bookmarks.CreateWrite
Adds one or more Posts to the authenticated user's Bookmarks. Supply `tweet_id` for a single Post, or `tweet_ids` (at most 25) to bookmark several in one request. Optional `folder_id` applies to every Post in the request. Billing and rate limits still apply per HTTP request. Send tweet_id or tweet_ids, not both. Needs a user (OAuth 2.0) token.
users.bookmarks.create
- Bookmarks.DeleteWrite
Removes a Post from the authenticated user's Bookmarks by its ID. Needs a user (OAuth 2.0) token.
users.bookmarks.delete
- Bookmarks.Folders.CreateWrite
Creates a new Bookmark folder for the authenticated user. Needs a user (OAuth 2.0) token.
users.bookmarks.folders.create
- Bookmarks.Folders.ListRead-only
Retrieves a list of Bookmark folders created by the authenticated user. Needs a user (OAuth 2.0) token.
users.bookmarks.folders.list
- Bookmarks.Folders.List PostsRead-only
Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. Needs a user (OAuth 2.0) token.
users.bookmarks.folders.listPosts
- Bookmarks.ListRead-only
Retrieves a list of Posts bookmarked by the authenticated user. Needs a user (OAuth 2.0) token.
users.bookmarks.list
- Broadcasts.CreateDestructive
Creates a broadcast on one of the authenticated user's sources. `id` must be the authenticated user. The broadcast is `NOT_STARTED` and posts nothing until it is published with PUT /2/users/:id/broadcasts/:broadcast_id/state; one that is never published is deleted after 7 days. When the source already has a running broadcast, that broadcast is returned. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
users.broadcasts.create
- Broadcasts.DeleteDestructive
Deletes one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use DELETE /2/broadcasts/:id. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
users.broadcasts.delete
- Broadcasts.GetRead-only
Returns one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts/:id. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
users.broadcasts.get
- Broadcasts.ListRead-only
Returns the authenticated user's broadcasts, 100 per page. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
users.broadcasts.list
- Broadcasts.Update StateDestructive
Publishes or ends one of the authenticated user's broadcasts. `id` must be the authenticated user. `PUBLISH` takes a broadcast created with POST /2/users/:id/broadcasts live once its source is receiving video, and posts it unless `should_not_tweet` is true. `END` ends the broadcast. Deprecated: use PUT /2/broadcasts/:id/state to end a broadcast. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
users.broadcasts.updateState
- Followed Lists.FollowWrite
Causes the authenticated user to follow a specific List by its ID. Needs a user (OAuth 2.0) token.
users.followedLists.follow
- Followed Lists.ListRead-only
Retrieves a list of Lists followed by a specific User by their ID.
users.followedLists.list
- Followed Lists.UnfollowWrite
Causes the authenticated user to unfollow a List by its ID. Needs a user (OAuth 2.0) token.
users.followedLists.unfollow
- FollowersRead-only
Retrieves a list of Users who follow a specific User by their ID.
users.followers
- Following.FollowWrite
Causes the authenticated user to follow a specific User by their ID. X removed this from the self-serve pay-per-use tiers on 2026-04-20, so it may answer 403 unless the app has an enterprise or legacy tier. Needs a user (OAuth 2.0) token.
users.following.follow
- Following.ListRead-only
Retrieves a list of Users followed by a specific User by their ID.
users.following.list
- Following.UnfollowWrite
Causes the authenticated user to unfollow a specific user by their ID. Needs a user (OAuth 2.0) token.
users.following.unfollow
- GetRead-only
Retrieves details of a specific User by their ID.
users.get
- Get By UsernameRead-only
Retrieves details of a specific User by their username. Billed by X as one user read ($0.010).
users.getByUsername
- Get ManyRead-only
Retrieves details of multiple Users by their IDs.
users.getMany
- Get Many By UsernamesRead-only
Retrieves details of multiple Users by their usernames.
users.getManyByUsernames
- Likes.LikeWrite
Causes the authenticated user to like a specific Post by its ID. X removed this from the self-serve pay-per-use tiers on 2026-04-20, so it may answer 403 unless the app has an enterprise or legacy tier. Needs a user (OAuth 2.0) token.
users.likes.like
- Likes.ListRead-only
Retrieves a list of Posts liked by a specific User by their ID. Needs a user (OAuth 2.0) token.
users.likes.list
- Likes.UnlikeWrite
Causes the authenticated user to unlike a specific Post by its ID. Needs a user (OAuth 2.0) token.
users.likes.unlike
- List MembershipsRead-only
Retrieves a list of Lists that a specific User is a member of by their ID.
users.listMemberships
- MeRead-only
Get the user the access token belongs to (id, name, username). Billed by X as one user read ($0.010). Needs a user (OAuth 2.0) token.
users.me
- MentionsRead-only
Retrieves a list of Posts that mention a specific User by their ID. When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`.
users.mentions
- Muting.ListRead-only
Retrieves a list of Users muted by the authenticated user. Needs a user (OAuth 2.0) token.
users.muting.list
- Muting.MuteWrite
Causes the authenticated user to mute a specific User by their ID. Needs a user (OAuth 2.0) token.
users.muting.mute
- Muting.UnmuteWrite
Causes the authenticated user to unmute the target user. Needs a user (OAuth 2.0) token.
users.muting.unmute
- My FollowersRead-only
Returns the Users who follow the authenticated user. Same results as `GET /2/users/{id}/followers` with your own user ID, without looking it up. Needs a user (OAuth 2.0) token.
users.myFollowers
- My FollowingRead-only
Returns the Users the authenticated user follows. Same results as `GET /2/users/{id}/following` with your own user ID, without looking it up. Needs a user (OAuth 2.0) token.
users.myFollowing
- Owned ListsRead-only
Retrieves a list of Lists owned by a specific User by their ID.
users.ownedLists
- Pinned Lists.ListRead-only
Retrieves a list of Lists pinned by the authenticated user. Needs a user (OAuth 2.0) token.
users.pinnedLists.list
- Pinned Lists.PinWrite
Causes the authenticated user to pin a specific List by its ID. Needs a user (OAuth 2.0) token.
users.pinnedLists.pin
- Pinned Lists.UnpinWrite
Causes the authenticated user to unpin a List by its ID. Needs a user (OAuth 2.0) token.
users.pinnedLists.unpin
- PostsRead-only
Retrieves a list of Posts authored by a specific User by their ID. When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`.
users.posts
- Public Keys.AddWrite
Registers a user's public key for X Chat encryption. Needs a user (OAuth 2.0) token.
users.publicKeys.add
- Public Keys.GetRead-only
Returns a user's registered public keys for X Chat encryption. Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version and juicebox_config. Needs a user (OAuth 2.0) token.
users.publicKeys.get
- Public Keys.Get ManyRead-only
Returns the public keys that up to 100 users registered for X Chat encryption, looked up by numeric user ID. Each key carries the user_id of the user it belongs to. Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version, juicebox_config and user_id. Needs a user (OAuth 2.0) token.
users.publicKeys.getMany
- Reposts Of MeRead-only
Retrieves a list of Posts that repost content from the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope timeline.read (pass scopes to the plugin).
users.repostsOfMe
- Reposts.CreateDestructive
Causes the authenticated user to repost a specific Post by its ID. Billed by X: $0.015 per post, $0.20 for a post that contains a URL. Needs a user (OAuth 2.0) token.
users.reposts.create
- Reposts.DeleteWrite
Causes the authenticated user to unrepost a specific Post by its ID. Needs a user (OAuth 2.0) token.
users.reposts.delete
- SearchRead-only
Retrieves a list of Users matching a search query.
users.search
- Sources.CreateWrite
Creates a persistent RTMP/RTMPS ingest point for the authenticated user. `id` must be the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
users.sources.create
- Sources.DeleteDestructive
Deletes one of the authenticated user's stream sources. `id` must be the authenticated user. Success is an empty object. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
users.sources.delete
- Sources.GetRead-only
Returns one of the authenticated user's stream sources. `id` must be the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
users.sources.get
- Sources.ListRead-only
Returns the authenticated user's RTMP/RTMPS stream sources (empty array if none). `id` must be the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
users.sources.list
- Sources.RenameWrite
Renames one of the authenticated user's stream sources. `id` must be the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
users.sources.rename
- TimelineRead-only
Retrieves a reverse chronological list of Posts in the authenticated user's Timeline. When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. Needs a user (OAuth 2.0) token.
users.timeline
- Unblock DmsWrite
Unblocks direct messages to or from a specific User by their ID for the authenticated user. Needs a user (OAuth 2.0) token.
users.unblockDms
Chat
- Conversations.Add KeysWrite
Adds (initializes or rotates) the encryption keys for a Chat conversation. Call this before sending messages in a new 1:1 conversation, and again with a newer key version to rotate the conversation key. For 1:1 conversations, provide the recipient's user ID as the conversation id; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.addKeys
- Conversations.ArchiveWrite
Archives a Chat conversation for the authenticated user only. Archiving an archived conversation changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.archive
- Conversations.DeleteDestructive
Deletes a Chat conversation for the authenticated user only; other participants keep it. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Deleting a pending message request's conversation deletes the request, like Delete in the X app. Needs a user (OAuth 2.0) token.
chat.conversations.delete
- Conversations.Disable Message TtlWrite
Stops new messages in a 1:1 or group Chat conversation from disappearing, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.disableMessageTtl
- Conversations.Enable Message TtlWrite
Sets how long new messages in a 1:1 or group Chat conversation last before they disappear, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.enableMessageTtl
- Conversations.GetRead-only
Returns metadata for a Chat conversation including type, muted status, group details, and your unread state. For the unread state, request chat_conversation.fields=unread,last_read_event_id,newest_event_id: those fields give your read state, computed from your latest read receipt and the conversation's latest notifying message. Use chat_conversation.fields to select which fields are returned. Needs a user (OAuth 2.0) token.
chat.conversations.get
- Conversations.ListRead-only
Retrieves a list of Chat conversations for the authenticated user's inbox, newest first: the most recently active conversation comes first. To find the chat with a particular person, start with participant_query set to their @username or name; with expansions=participant_ids, user.fields=receives_your_chat says how you can message each match. Needs a user (OAuth 2.0) token.
chat.conversations.list
- Conversations.List EventsRead-only
Retrieves the events of a specific Chat conversation, newest first, with pagination support: messages, key changes, group changes, and read receipts. Events with an id above the conversation's last_read_event_id are unread: they come after the point you read up to. To collect them, page until an event's id is at or below it. Only `id` and `encoded_event` are always present. Needs a user (OAuth 2.0) token.
chat.conversations.listEvents
- Conversations.List Pinned MessagesRead-only
Retrieves the pinned message events of a Chat conversation with pagination support. Each event is a Base64-encoded Thrift pin event whose contents are end-to-end encrypted; decode and decrypt it client-side. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.listPinnedMessages
- Conversations.Mark ReadWrite
Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Without action_signatures the conversation is marked read up to its newest event and the read receipt is unsigned. Needs a user (OAuth 2.0) token.
chat.conversations.markRead
- Conversations.Mark UnreadWrite
Marks a specific Chat conversation as unread on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.markUnread
- Conversations.MuteWrite
Mutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.mute
- Conversations.Send TypingWrite
Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.sendTyping
- Conversations.UnarchiveWrite
Unarchives a Chat conversation for the authenticated user only. Unarchiving a conversation that is not archived changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.unarchive
- Conversations.UnmuteWrite
Unmutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.unmute
- Conversations.Update Screen CaptureWrite
Turns screenshot blocking or screenshot detection on or off in a Chat conversation, for every participant. In a group conversation, only admins can change these settings. Each request changes one setting: send either blocking or detection. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Needs a user (OAuth 2.0) token.
chat.conversations.updateScreenCapture
- Groups.Admin Requests.ApproveWrite
Makes the user who requested admin permissions an admin of an encrypted Chat group conversation. Only a group admin can approve. Needs a user (OAuth 2.0) token.
chat.groups.adminRequests.approve
- Groups.Admin Requests.CreateWrite
Asks the admins of an encrypted Chat group conversation to make the authenticated user an admin. An admin approves or rejects the request. Needs a user (OAuth 2.0) token.
chat.groups.adminRequests.create
- Groups.Admin Requests.ListRead-only
Returns the users who have asked to become admins of an encrypted Chat group conversation. Only a group admin can list admin requests. Use user.fields to select which profile fields are returned. Needs a user (OAuth 2.0) token.
chat.groups.adminRequests.list
- Groups.Admin Requests.RejectWrite
Declines a user's pending request for admin permissions in an encrypted Chat group conversation. Only a group admin can reject. Needs a user (OAuth 2.0) token.
chat.groups.adminRequests.reject
- Groups.Admins.AddWrite
Grants admin rights to one or more members of an existing encrypted Chat group conversation. Needs a user (OAuth 2.0) token.
chat.groups.admins.add
- Groups.Admins.RemoveWrite
Revokes admin rights from one or more admins of an existing encrypted Chat group conversation. They stay members of the group. Needs a user (OAuth 2.0) token.
chat.groups.admins.remove
- Groups.CreateDestructive
Creates a new encrypted Chat group conversation on behalf of the authenticated user. Needs a user (OAuth 2.0) token.
chat.groups.create
- Groups.InitializeWrite
Initializes a new Chat group conversation and returns a unique conversation ID. Use the returned conversation_id in a subsequent POST /chat/conversations/group call to fully create and configure the group. Needs a user (OAuth 2.0) token.
chat.groups.initialize
- Groups.Invite Link.DisableWrite
Turns off the invite link for an encrypted Chat group conversation. The existing link stops working. Needs a user (OAuth 2.0) token.
chat.groups.inviteLink.disable
- Groups.Invite Link.EnableWrite
Turns on the invite link for an encrypted Chat group conversation and returns the link details. The client builds the link and sends it as invite_url, in the form https://x.com/i/chat/group_join/<conversation_id>/<token>, where the token is exactly 10 letters, digits, '-' or '_'. invite_url is required when action_signatures is sent. Needs a user (OAuth 2.0) token.
chat.groups.inviteLink.enable
- Groups.Invite Link.GetRead-only
Returns the preview of an encrypted Chat group conversation from its invite link: group name, avatar, member count, and the authenticated user's join state. The conversation ID and the token both come from the invite link. Needs a user (OAuth 2.0) token.
chat.groups.inviteLink.get
- Groups.Join Requests.CreateWrite
Asks to join an encrypted Chat group conversation through its invite link. The request stays pending until a group admin adds the user to the group. Needs a user (OAuth 2.0) token.
chat.groups.joinRequests.create
- Groups.Join Requests.RejectWrite
Rejects pending requests to join an encrypted Chat group conversation. Only group admins can reject requests. To approve a request instead, add the requesting users with addChatGroupMembers; adding a user clears their pending request. Needs a user (OAuth 2.0) token.
chat.groups.joinRequests.reject
- Groups.Members.AddWrite
Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key. Adding a user who has a pending join request approves that request; approval needs the same key-rotation body as adding any member. Needs a user (OAuth 2.0) token.
chat.groups.members.add
- Groups.Members.RemoveWrite
Removes one or more members from an existing encrypted Chat group conversation. To leave a group, pass your own user ID. Leaving does not delete the conversation for the caller. When the removal rotates the conversation key, send group_key_rotation_data and the action signatures for the removal and the key change, in that order. Needs a user (OAuth 2.0) token.
chat.groups.members.remove
- Groups.UpdateWrite
Renames an encrypted Chat group conversation, changes its avatar, or sets its description. The client encrypts each value with the conversation key and lists the values it changed in modified_fields. Needs a user (OAuth 2.0) token.
chat.groups.update
- Groups.Update Admin SettingsWrite
Sets which actions only admins can perform in an existing encrypted Chat group conversation. A setting set to true restricts that action to admins, and false opens it to all members. Setting `send_message` to true makes the group announcement-only. Omitted settings keep their stored value. Needs a user (OAuth 2.0) token.
chat.groups.updateAdminSettings
- Media.Append UploadWrite
Appends media data to an XChat upload session. Pass media as { base64: "…" }, { url } or a public URL string (a bare string is a URL, not base64); the plugin base64-encodes the bytes for X. Up to 4 MB per segment. Needs a user (OAuth 2.0) token.
chat.media.appendUpload
- Media.DownloadRead-only
Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. A media item too large to return in one response fails with a 413 problem of type `https://api.x.com/2/problems/response-too-large`, and a retry fails the same way. Needs a user (OAuth 2.0) token.
chat.media.download
- Media.Finalize UploadWrite
Finalizes an XChat media upload session. Needs a user (OAuth 2.0) token.
chat.media.finalizeUpload
- Media.Initialize UploadWrite
Initializes an XChat media upload session. Needs a user (OAuth 2.0) token.
chat.media.initializeUpload
- Message Requests.AcceptWrite
Accepts the other user's pending message request in a 1:1 Chat conversation, which moves to the authenticated user's inbox. Without a pending request, including after a successful accept, the response is 404. Replying to a request does not accept it. Needs a user (OAuth 2.0) token.
chat.messageRequests.accept
- Message Requests.GetWrite
Retrieves the message request state of a 1:1 Chat conversation and its newest message events. Like opening the request in an X app, reading it marks the returned messages as delivered and updates the unread badge. Needs a user (OAuth 2.0) token.
chat.messageRequests.get
- Message Requests.ListRead-only
Retrieves the authenticated user's pending Chat message requests from one inbox. Message contents are end-to-end encrypted unless the conversation is unencrypted. Accepting or deleting requests between pages can skip or repeat requests, and a page can be empty while `next_token` is set. Needs a user (OAuth 2.0) token.
chat.messageRequests.list
- Messages.DeleteDestructive
Deletes one or more messages from a Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Delete for all removes a message you sent (or, in groups you administer, any message) for every participant; delete for self removes any message only from your own view. Needs a user (OAuth 2.0) token.
chat.messages.delete
- Messages.SendDestructive
Sends a message or reaction to a Chat conversation, which you can find with `participant_query` on Get Chat Conversations. Send it end-to-end encrypted by default: `encoded_message_create_event`, built with the Chat XDK. Needs a user (OAuth 2.0) token.
chat.messages.send
- Settings.GetRead-only
Returns the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. Needs a user (OAuth 2.0) token.
chat.settings.get
- Settings.UpdateWrite
Updates the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. allow_dms_from, dm_receipt_settings, and dm_quality_filter accept only their listed values, matched exactly and case-sensitively; anything else is a 400. av_settings must set at least one of its settings. Needs a user (OAuth 2.0) token.
chat.settings.update
Broadcasts
- Chat Moderators.AddWrite
Adds a moderator to the authenticated broadcaster's persistent list and returns the updated moderator user IDs. The list applies to all current and future broadcast chats. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.chatModerators.add
- Chat Moderators.ListRead-only
Returns the authenticated broadcaster's persistent moderators as User resources. The list applies to all of their current and future broadcast chats. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
broadcasts.chatModerators.list
- Chat Moderators.RemoveWrite
Removes a moderator from the authenticated broadcaster's persistent list and returns the updated moderator user IDs. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.chatModerators.remove
- Chat Mutes.CreateWrite
Prevents a user from posting messages in all of a broadcaster's chats. Without `broadcast_id`, the user is muted in the authenticated user's own chats. Moderators pass `broadcast_id` to mute the user in that broadcast host's chats. When `end_at_ms` is provided, the mute expires at that time. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.chatMutes.create
- Chat Mutes.DeleteWrite
Allows a muted user to post messages in a broadcaster's chats again. Without `broadcast_id`, the user is unmuted in the authenticated user's own chats. Moderators pass `broadcast_id` to unmute the user in that broadcast host's chats. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.chatMutes.delete
- Chat Mutes.ListRead-only
Returns the users muted in the authenticated broadcaster's chat, with the expiry time of timed mutes. Mutes apply to all of their broadcasts. Expired timed mutes are omitted. Use `expansions=user_id` to include the muted users. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
broadcasts.chatMutes.list
- Chat.Delete MessageDestructive
Removes a specific chat message from a running broadcast where the authenticated user is the host or a moderator. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.chat.deleteMessage
- Chat.ListRead-only
Returns newest-first chat messages for a broadcast owned by the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
broadcasts.chat.list
- Chat.Mute UserWrite
Prevents a user from posting further messages in a running broadcast chat. When `end_at_ms` is provided, the mute expires at that time. The authenticated user must be the broadcast host or a moderator. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.chat.muteUser
- Chat.SendDestructive
Posts a chat message to a running broadcast, attributed to the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.chat.send
- Chat.Unmute UserWrite
Allows a muted user to post messages in a running broadcast chat again. The authenticated user must be the broadcast host or a moderator. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.chat.unmuteUser
- CreateDestructive
Takes one or more of the authenticated user's sources live and returns 201 with the new broadcast. Several sources (`source_id` plus `additional_source_ids`, one per video format) go live together as one broadcast; they must all be RTMP sources in one region, and when one of them is already live its broadcast is returned only if it holds every listed source. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.create
- DeleteDestructive
Deletes one of the authenticated user's broadcasts, scheduled or ended, including its replay. A running broadcast must be ended first. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.delete
- EndDestructive
Ends one of the authenticated user's broadcasts. Only `state: END` is supported. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.end
- GetRead-only
Returns a broadcast owned by the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
broadcasts.get
- ListRead-only
Returns the authenticated user's live-video broadcasts, or selected owned broadcasts when ids are provided. At most one of `ids`, `max_results` may be provided. At most one of `ids`, `pagination_token` may be provided. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
broadcasts.list
- List CategoriesRead-only
Returns the live categories a host can pick when going live, in display order. Pass a category's `id` as `live_category_id` on POST /2/broadcasts. Ids are permanent; names can change, so store the id and show the current name. The whole list is returned in one response, without paging. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
broadcasts.listCategories
- Scheduled.CreateWrite
Schedules a broadcast for the authenticated user on one of their sources: `source_id` is required. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.scheduled.create
- Scheduled.DeleteDestructive
Deletes a scheduled broadcast by its alphanumeric broadcast id. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.scheduled.delete
- Scheduled.GetRead-only
Returns a single scheduled broadcast by its alphanumeric broadcast id. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
broadcasts.scheduled.get
- Scheduled.Go LiveDestructive
Publishes a schedule that was created or updated with `manual_publish: true`. Without that flag the coordinator auto-publishes at start and this call is rejected. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.scheduled.goLive
- Scheduled.ListRead-only
Returns scheduled broadcasts owned by the authenticated user. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
broadcasts.scheduled.list
- Scheduled.UpdateWrite
Updates a scheduled broadcast. Path `:id` is the broadcast id; the body must include `scheduled_broadcast_id`. Re-send every field that should be kept. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.scheduled.update
- UpdateWrite
Changes the title, chat option or live category of one of the authenticated user's broadcasts and returns the broadcast. Send at least one of `title`, `chat_option` and `live_category_id`; fields left out keep their values. A broadcast can be updated before it starts, while it is live and after it has ended. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
broadcasts.update
Posts
- AnalyticsRead-only
Retrieves analytics data for specified Posts within a defined time range. Needs a user (OAuth 2.0) token.
posts.analytics
- Counts.AllRead-only
Retrieves the count of Posts matching a search query from the full archive. At most one of `pagination_token`, `next_token` may be provided. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
posts.counts.all
- Counts.RecentRead-only
Retrieves the count of Posts from the last 7 days matching a search query. At most one of `pagination_token`, `next_token` may be provided.
posts.counts.recent
- CreateDestructive
Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Media in media.media_ids is attached in the order given; get the ids by uploading each image with Upload Media, or a video with Initialize Media Upload. Supports paid partnership disclosure via the paid_partnership field. Billed by X: $0.015 per post, $0.20 for a post that contains a URL. Quote posts (quote_tweet_id): X removed this from the self-serve pay-per-use tiers on 2026-04-20, so it may answer 403 unless the app has an enterprise or legacy tier. Needs a user (OAuth 2.0) token.
posts.create
- DeleteDestructive
Deletes a specific Post by its ID, if owned by the authenticated user. Needs a user (OAuth 2.0) token.
posts.delete
- Drafts.CreateWrite
Saves a Post draft to the authenticated user's X account without publishing it. Takes the body of Create or Edit Post, of which a draft stores text, media with tagged users, a reply and the AI and paid partnership disclosures. Any other field that is set is a 400 that names it. Needs a user (OAuth 2.0) token.
posts.drafts.create
- Drafts.DeleteDestructive
Deletes one of the authenticated user's Post drafts by its ID. The whole draft is deleted, including any part Get Post Drafts does not list, and cannot be restored. An ID that is not one of the user's drafts also returns deleted: true. Needs a user (OAuth 2.0) token.
posts.drafts.delete
- Drafts.ListRead-only
Returns the authenticated user's Post drafts, newest first, in the fields of the Create or Edit Post body. thread holds the Posts after the first. A draft with unsupported_content is not listed in full: do not publish it from this list or delete it unless the user asks. Needs the tweet.write scope. Needs a user (OAuth 2.0) token.
posts.drafts.list
- GetRead-only
Retrieves details of a specific Post by its ID.
posts.get
- Get ManyRead-only
Retrieves details of multiple Posts by their IDs.
posts.getMany
- Hide ReplyWrite
Hides or unhides a reply to a conversation owned by the authenticated user. Needs a user (OAuth 2.0) token.
posts.hideReply
- Liking UsersRead-only
Retrieves a list of Users who liked a specific Post by its ID. Needs a user (OAuth 2.0) token.
posts.likingUsers
- QuotesRead-only
Retrieves a list of Posts that quote a specific Post by its ID.
posts.quotes
- Reposted ByRead-only
Retrieves a list of Users who reposted a specific Post by its ID.
posts.repostedBy
- RepostsRead-only
Retrieves a list of Posts that repost a specific Post by its ID.
posts.reposts
- Search.AllRead-only
Retrieves Posts from the full archive matching a search query. At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. Billed by X per post returned ($0.005 each); keep max_results low.
posts.search.all
- Search.RecentRead-only
Retrieves Posts from the last 7 days matching a search query. At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. Billed by X per post returned ($0.005 each); keep max_results low.
posts.search.recent
- Stream Links.CreateWrite
Creates a link to deliver FilteredStream events to the given webhook. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
posts.streamLinks.create
- Stream Links.DeleteDestructive
Deletes the link delivering FilteredStream events to the given webhook. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
posts.streamLinks.delete
- Stream Links.ListRead-only
Get a list of webhook links associated with a filtered stream ruleset. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
posts.streamLinks.list
- Stream Rules.CountsRead-only
Retrieves the count of rules in the active rule set for the filtered stream. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
posts.streamRules.counts
- Stream Rules.ListRead-only
Returns the active filtered-stream rules for the authenticated app. Provide `ids` to fetch specific rules; omit it to list all rules. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
posts.streamRules.list
- Stream Rules.UpdateDestructive
Adds or deletes rules from the active rule set for the filtered stream. Exactly one of `add`, `delete`, or `?delete_all=true` must be specified. Use `?dry_run=true` to validate without committing. Send exactly one of add, delete or delete_all: true; dry_run checks the change without applying it. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
posts.streamRules.update
Media
- Amplify.Add PostDestructive
Publishes one of the authenticated user's video posts into one or more active Amplify pre-roll programs the user is enrolled in as a publisher. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope media.library.write (pass scopes to the plugin).
media.amplify.addPost
- Amplify.Programs.GetRead-only
Returns one Amplify pre-roll program the authenticated user is enrolled in as a publisher. A program the user is not enrolled in is reported as not found. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope media.library.read (pass scopes to the plugin).
media.amplify.programs.get
- Amplify.Programs.ListRead-only
Returns the Amplify pre-roll programs the authenticated user is enrolled in as a publisher. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope media.library.read (pass scopes to the plugin).
media.amplify.programs.list
- Amplify.Programs.List PostsRead-only
Returns the posts published into an Amplify pre-roll program the authenticated user is enrolled in as a publisher. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope media.library.read (pass scopes to the plugin).
media.amplify.programs.listPosts
- AnalyticsRead-only
Retrieves analytics data for media. Needs a user (OAuth 2.0) token.
media.analytics
- GetRead-only
Retrieves details of a specific Media file by its media key.
media.get
- Get ManyRead-only
Retrieves details of Media files by their media keys.
media.getMany
- Library.AddWrite
Adds previously uploaded media to the authenticated user's Media Library with its library metadata. The user must own the media. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope media.library.write (pass scopes to the plugin).
media.library.add
- Library.List CategoriesRead-only
Returns the video categories a publisher can assign to a media library item and the advertiser categories whose ads can be blocked from running against it. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope media.library.read (pass scopes to the plugin).
media.library.listCategories
- Library.RemoveDestructive
Removes an item from the authenticated user's Media Library. Posts scheduled through the API that have not yet been published and still use the media are cancelled. Published posts and the underlying media are not affected. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope media.library.write (pass scopes to the plugin).
media.library.remove
- Library.UpdateWrite
Updates the library metadata of an item in the authenticated user's Media Library. Only the fields sent are changed; the others keep their values. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope media.library.write (pass scopes to the plugin).
media.library.update
- Metadata.CreateWrite
Creates metadata for a Media file. Needs a user (OAuth 2.0) token.
media.metadata.create
- Subtitles.CreateWrite
Creates subtitles for a specific Media file. Needs a user (OAuth 2.0) token.
media.subtitles.create
- Subtitles.DeleteDestructive
Deletes subtitles for a specific Media file. Needs a user (OAuth 2.0) token.
media.subtitles.delete
- Upload.AppendWrite
Appends one segment of the file to a chunked upload. Send the segment base64-encoded in media (raw bytes in multipart bodies) and its position in the file in segment_index, counting from 0. A segment can be up to 8 MB; in a JSON body keep it to 4 MB or less, because base64 adds a third. After the last segment, call Finalize Media Upload. Pass media as { base64: "…" }, { url } or a public URL string (a bare string is a URL, not base64); the plugin base64-encodes the bytes for X. Up to 4 MB per segment. Needs a user (OAuth 2.0) token.
media.upload.append
- Upload.FinalizeWrite
Completes a chunked upload once every segment is appended. For video the result carries processing_info: the media can go on a Post only when its state is succeeded, so call Get Media Upload Status until it is. A result without processing_info is ready to use. Needs a user (OAuth 2.0) token.
media.upload.finalize
- Upload.Get StatusRead-only
Returns how far X has processed an uploaded media file, in processing_info.state: pending, in_progress, succeeded or failed. Call it after Finalize Media Upload returns processing_info, waiting check_after_secs between calls, until the state is succeeded. A failed state means the media can't be used. Needs a user (OAuth 2.0) token.
media.upload.getStatus
- Upload.InitializeWrite
Starts a chunked media upload and returns its id. Use it for video and for other files too large for one request. For a video on a Post, set media_category to tweet_video, media_type to the file's type (for example video/mp4) and total_bytes to the file's size. Send the file with Append Media Upload, call Finalize Media Upload, then pass the id in media.media_ids on Create or Edit Post. Needs a user (OAuth 2.0) token.
media.upload.initialize
- Upload.SingleWrite
Uploads a media file in one request and returns its id. Send the file base64-encoded in media (raw bytes in multipart bodies). For a Post, set media_category to tweet_image (JPG, PNG, GIF or WEBP, up to 5 MB) or tweet_gif, then pass the returned id in media.media_ids on Create or Edit Post. DM media uses dm_image or dm_gif. For video, use Initialize Media Upload. Pass media as { base64: "…" }, { url } or a public URL string (a bare string is a URL, not base64); the plugin base64-encodes the bytes for X. Up to 15 MB here; use the chunked upload (initialize, append, finalize) for video. Needs a user (OAuth 2.0) token.
media.upload.single
Calls
- CreateDestructive
Starts an X call hosted by the authenticated user (typically a bot). Pass an XChat conversation_id to start the call in that conversation, or omit it for a standalone call anyone can join with the returned join_url (subject to join_policy). The call starts empty: put an agent in it with POST /2/calls/:id/join. When the host joins a conversation call, the other members are rung. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.write (pass scopes to the plugin).
calls.create
- GetRead-only
Returns a call's title, join policy, host and participant count, and whether the authenticated user may join it without asking the host. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.read (pass scopes to the plugin).
calls.get
- JoinWrite
Starts a media session that takes part in the call as the authenticated user. The response carries a media_url and a short-lived media_token: open a WebSocket to media_url with the token as a Bearer credential to exchange PCM16 audio and events with the call; the user enters the call when the WebSocket connects. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.join (pass scopes to the plugin).
calls.join
- LeaveWrite
Ends the authenticated user's media session in the call (its WebSocket receives session.ended with reason left) and removes the user from the call. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.join (pass scopes to the plugin).
calls.leave
- Scheduled.CancelDestructive
Cancels a scheduled call the authenticated user organizes, and takes it off invitees' calendars. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. Cancelling what is already cancelled succeeds. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.write (pass scopes to the plugin).
calls.scheduled.cancel
- Scheduled.CreateDestructive
Puts an X call on the authenticated user's X Calls calendar, with them as its organizer, and invites people to it. The call exists right away: share its join_url, or put an agent in it at start time with POST /2/calls/:id/join. A recurrence (an RFC 5545 RRULE) repeats it. Invitees get an email unless notify_invitees is false. Invitees get an email unless notify_invitees is false. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.write (pass scopes to the plugin).
calls.scheduled.create
- Scheduled.GetRead-only
Returns a scheduled call the authenticated user organizes or is invited to, at its occurrence running now or its next one within a year: its time, call, recurrence and who is invited and how they answered. Changes can take a few seconds to show here. Use scheduled_call.fields to select which fields are returned. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.read (pass scopes to the plugin).
calls.scheduled.get
- Scheduled.ListRead-only
Returns the X calls on the authenticated user's calendar, earliest first: events on their X Calls calendar, and events on the Microsoft Outlook calendars they linked to X whose conference is an X call. Calls still running at start_time are included. The window defaults to the next 24 hours and may span at most 7 days. Use scheduled_call.fields to select which fields are returned. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.read (pass scopes to the plugin).
calls.scheduled.list
- Scheduled.RespondWrite
Accepts, declines or tentatively accepts an invitation to a scheduled call for the authenticated user. For a recurring call, scope and occurrence_start_time pick the occurrences the answer is for: all of them (the default), one, or one and every one after it. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.write (pass scopes to the plugin).
calls.scheduled.respond
- Scheduled.UpdateDestructive
Moves, renames or re-invites a scheduled call the authenticated user organizes. Only the fields sent change. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. Invitees get an email about the change unless notify_invitees is false. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope calls.write (pass scopes to the plugin).
calls.scheduled.update
Direct Messages
- Conversations.CreateDestructive
Initiates a new direct message conversation with specified participants. Billed by X: $0.015 per Direct Message. Needs a user (OAuth 2.0) token.
directMessages.conversations.create
- Events.DeleteDestructive
Deletes a specific direct message event by its ID, if owned by the authenticated user. Needs a user (OAuth 2.0) token.
directMessages.events.delete
- Events.GetRead-only
Retrieves details of a specific direct message event by its ID. Needs a user (OAuth 2.0) token.
directMessages.events.get
- Events.ListRead-only
Retrieves a list of recent direct message events across all conversations. Billed by X per DM event returned ($0.010 each). Needs a user (OAuth 2.0) token.
directMessages.events.list
- Events.List By ConversationRead-only
Retrieves direct message events for a specific conversation by its ID. Needs a user (OAuth 2.0) token.
directMessages.events.listByConversation
- Events.List With ParticipantRead-only
Retrieves direct message events for the one-to-one conversation between the authenticated user and a specific participant. Needs a user (OAuth 2.0) token.
directMessages.events.listWithParticipant
- Media.DownloadRead-only
Downloads media attached to a legacy Direct Message. The requesting user must be a participant in the conversation containing the specified DM event. The response body contains raw binary bytes. Needs a user (OAuth 2.0) token.
directMessages.media.download
- Send To ConversationDestructive
Sends a new direct message to a specific conversation by its ID. Billed by X: $0.015 per Direct Message. Needs a user (OAuth 2.0) token.
directMessages.sendToConversation
- Send To ParticipantDestructive
Sends a new direct message to a specific participant by their ID. Billed by X: $0.015 per Direct Message. Needs a user (OAuth 2.0) token.
directMessages.sendToParticipant
Lists
- CreateWrite
Creates a new List for the authenticated user. Needs a user (OAuth 2.0) token.
lists.create
- DeleteDestructive
Deletes a specific List owned by the authenticated user by its ID. Needs a user (OAuth 2.0) token.
lists.delete
- Followers.ListRead-only
Retrieves a list of Users who follow a specific List by its ID.
lists.followers.list
- GetRead-only
Retrieves details of a specific List by its ID.
lists.get
- Members.AddWrite
Adds a User to a specific List by its ID. Needs a user (OAuth 2.0) token.
lists.members.add
- Members.ListRead-only
Retrieves a list of Users who are members of a specific List by its ID.
lists.members.list
- Members.RemoveWrite
Removes a User from a List by their ID. Needs a user (OAuth 2.0) token.
lists.members.remove
- Posts.ListRead-only
Retrieves a list of Posts associated with a specific List by its ID.
lists.posts.list
- UpdateWrite
Updates the details of a specific List owned by the authenticated user by its ID. Needs a user (OAuth 2.0) token.
lists.update
Sources
- CreateWrite
Creates a persistent RTMP/RTMPS ingest point for the authenticated user. Push an encoder to `rtmps_url` with the returned `stream_key`. This is the only response that includes the stream key; read it later with GET /2/sources/:id/stream_key. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
sources.create
- DeleteDestructive
Deletes one of the authenticated user's stream sources. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
sources.delete
- GetRead-only
Returns one of the authenticated user's stream sources. Poll it after starting an encoder and wait for `is_stream_active` before going live. The stream key is not included; read it with GET /2/sources/:id/stream_key. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
sources.get
- Get Ingest RegionRead-only
Returns the ingest region nearest the server handling the request. Pass it as `region` when creating a stream source to ingest there. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
sources.getIngestRegion
- Get Stream KeyRead-only
Returns the stream key of one of the authenticated user's stream sources. The stream key is a credential: anyone with it can stream to the source, so keep it out of logs, URLs and client-side code. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
sources.getStreamKey
- ListRead-only
Returns the authenticated user's RTMP/RTMPS stream sources. A source's `id` is the `source_id` that POST /2/broadcasts and scheduled broadcasts take. Stream keys are not included; read one with GET /2/sources/:id/stream_key. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read (pass scopes to the plugin).
sources.list
- RenameWrite
Renames one of the authenticated user's stream sources. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).
sources.rename
Bots
- CreateDestructive
Creates a bot account in the calling app's project and returns its bearer token. Repeating the request for a handle the project already has returns that bot with a new token and revokes the previous one, so a retry can revoke a token another caller just received. Coordinate retries for the same handle.
bots.create
- DeleteDestructive
Deletes a bot account from the calling app's project. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is deleted from the user's project instead.
bots.delete
- ListRead-only
Retrieves the bot accounts in the calling app's project. meta.max_bots is the most bots the project can have. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
bots.list
- Token.RevokeDestructive
Revokes a bot's bearer token. The bot account is kept, and rotating its token mints a new one. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
bots.token.revoke
- Token.RotateDestructive
Mints a new bearer token for a bot and invalidates every token previously issued for it. The new token is returned only once.
bots.token.rotate
- UpdateWrite
Updates a bot's handle, display name, or who may send it Direct Messages. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
bots.update
Compliance
- Jobs.CancelDestructive
Cancels a Compliance Job that has not finished processing; its status becomes failed and a new job of the same type can be created. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
compliance.jobs.cancel
- Jobs.CreateWrite
Creates a new Compliance Job for the specified job type. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
compliance.jobs.create
- Jobs.Download ResultsRead-only
Downloads the results file of a completed Compliance Job using the signed URL returned at job creation. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
compliance.jobs.downloadResults
- Jobs.GetRead-only
Retrieves details of a specific Compliance Job by its ID. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
compliance.jobs.get
- Jobs.ListRead-only
Retrieves a list of Compliance Jobs filtered by job type and optional status. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
compliance.jobs.list
- Jobs.UploadWrite
Uploads the newline-delimited ID file for a Compliance Job using the signed URL returned at job creation. Pass file as { base64 } or a URL to a text file with one post or user ID per line. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
compliance.jobs.upload
Spaces
- GetRead-only
Retrieves details of a specific Space by its ID.
spaces.get
- Get By CreatorsRead-only
Retrieves details of Spaces created by specified User IDs.
spaces.getByCreators
- Get ManyRead-only
Retrieves details of multiple Spaces by their IDs.
spaces.getMany
- List BuyersRead-only
Retrieves a list of Users who purchased tickets to a specific Space by its ID. Needs a user (OAuth 2.0) token.
spaces.listBuyers
- List PostsRead-only
Retrieves a list of Posts shared in a specific Space by its ID.
spaces.listPosts
- SearchRead-only
Retrieves a list of Spaces matching the specified search query.
spaces.search
Account Activity
- Subscriptions.CountRead-only
Retrieves a count of currently active Account Activity subscriptions. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
accountActivity.subscriptions.count
- Subscriptions.CreateWrite
Creates an Account Activity subscription for the user and the given webhook. Needs a user (OAuth 2.0) token.
accountActivity.subscriptions.create
- Subscriptions.DeleteDestructive
Deletes an Account Activity subscription for the given webhook and user ID. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
accountActivity.subscriptions.delete
- Subscriptions.ListRead-only
Retrieves a list of all active subscriptions for a given webhook. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
accountActivity.subscriptions.list
- Subscriptions.ValidateRead-only
Checks a user's Account Activity subscription for a given webhook. Needs a user (OAuth 2.0) token.
accountActivity.subscriptions.validate
Activity
- Subscriptions.CreateWrite
Creates a subscription for an X activity event. OAuth2 user-context tokens must hold the scope matching the requested event_type: dm.read for chat.* and dm.* events, like.read for like.* events, mute.read for mute.* events, block.read for block.* events, follows.read for subscriptions.* events, and tweet.read for all other event types.
activity.subscriptions.create
- Subscriptions.DeleteDestructive
Deletes a subscription for an X activity event.
activity.subscriptions.delete
- Subscriptions.Delete ManyDestructive
Deletes multiple subscriptions for X activity events by their IDs. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
activity.subscriptions.deleteMany
- Subscriptions.ListRead-only
Get a list of active subscriptions for XAA. Optional user_id narrows the list to subscriptions whose filter.user_id matches; with a user-context token it must identify the authenticated user.
activity.subscriptions.list
- Subscriptions.UpdateWrite
Updates a subscription for an X activity event.
activity.subscriptions.update
Community Notes
- CreateDestructive
Creates a Community Note on a Post. With test_mode set to true, the note is only for testing and is not publicly visible. Needs a user (OAuth 2.0) token.
communityNotes.create
- DeleteDestructive
Deletes a community note. Needs a user (OAuth 2.0) token.
communityNotes.delete
- EvaluateWrite
Evaluates the text of a proposed Community Note on a Post and returns its claim-opinion score. Needs a user (OAuth 2.0) token.
communityNotes.evaluate
- Search Eligible PostsRead-only
Retrieves Posts that are eligible for Community Notes. Needs a user (OAuth 2.0) token.
communityNotes.searchEligiblePosts
- Search WrittenRead-only
Retrieves the Community Notes written by the authenticated user. Needs a user (OAuth 2.0) token.
communityNotes.searchWritten
Webhooks
- CreateWrite
Creates a new webhook configuration.
webhooks.create
- DeleteDestructive
Deletes an existing webhook configuration.
webhooks.delete
- ListRead-only
Get a list of webhook configs associated with a client app.
webhooks.list
- ReplayDestructive
Creates a replay job to retrieve events from up to the past 24 hours for all events delivered or attempted to be delivered to the webhook. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
webhooks.replay
- ValidateWrite
Triggers a CRC check for a given webhook.
webhooks.validate
Connections
- HistoryRead-only
Returns active and historical streaming connections with disconnect reasons for the authenticated application. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
connections.history
- Terminate AllDestructive
Terminates all active streaming connections for the authenticated application. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
connections.terminateAll
- Terminate By EndpointDestructive
Terminates all streaming connections for a specific endpoint ID for the authenticated application. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
connections.terminateByEndpoint
- Terminate ManyDestructive
Terminates multiple streaming connections by their UUIDs for the authenticated application. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
connections.terminateMany
Trends
- By WoeidRead-only
Retrieves trending topics for a specific location identified by its WOEID. `meta.location` describes that location: its `woeid` and `name`, and when they are known its `country`, `country_code`, `place_type` (`town`, `country` or `supername`) and `parent_id`, the WOEID of the place that contains it.
trends.byWoeid
- LocationsRead-only
Retrieves every location that has trends. Each location has a WOEID to pass to `GET /2/trends/by/woeid/{woeid}`. The list is short and is returned whole, so the route takes no paging parameters.
trends.locations
- PersonalizedRead-only
Retrieves personalized trending topics for the authenticated user. Needs a user (OAuth 2.0) token.
trends.personalized
Account
- EnsureWrite
Creates an X Developer Platform account for the authenticated user if they do not already have one, and returns it. Idempotent: when the user already has an account it is returned unchanged with `created` false. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope developer.write (pass scopes to the plugin).
account.ensure
- GetRead-only
Returns the X Developer Platform account that is billed for the authenticated user's API access. A user with no such account gets a resource-not-found error entry. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope developer.read (pass scopes to the plugin).
account.get
Articles
- Create DraftWrite
Creates a new Article draft that can later be published. Needs a user (OAuth 2.0) token.
articles.createDraft
- PublishDestructive
Publishes a draft Article, making it publicly visible. Needs a user (OAuth 2.0) token.
articles.publish
Communities
- GetRead-only
Retrieves details of a specific Community by its ID.
communities.get
- SearchRead-only
Retrieves a list of Communities matching the specified search query. Needs a user (OAuth 2.0) token.
communities.search
News
- GetRead-only
Retrieves news story by its ID.
news.get
- SearchRead-only
Retrieves a list of News stories matching the specified search query.
news.search
Tweets
- CreateDestructive
Publish a post on X as the connected user (camelCase inputs; posts.create takes X's own fields). Billed by X: $0.015 per post, $0.20 for a post that contains a URL.
tweets.create
- Create ReplyDestructive
Reply to a post on X as the connected user. Billed by X: $0.015 per post, $0.20 for a post that contains a URL.
tweets.createReply
Usage
- CreditsRead-only
Returns the payer's developer-platform credit balance in USD. total_balance is max(0, prepaid_balance + free_balance); prepaid_balance may be negative.
usage.credits
- GetRead-only
Retrieves usage statistics for Posts over a specified number of days. Needs app-only auth: X accepts only the app's Bearer token here (connect with authType 'api_key').
usage.get
Connect X (Twitter) to Claude, ChatGPT or Cursor
- 1
Connect X (Twitter) in Corsair
Sign in to X (Twitter) or add an API key once in Corsair. Corsair stores the credential encrypted and makes the X (Twitter) API calls for your agent, so it never goes into a prompt or a config file. Connect X (Twitter)
If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs X (Twitter). On a ChatGPT personal plan, connect X (Twitter) here first.
- 2
Add Corsair's MCP server to your agent
Every client uses the same address:
https://mcp.corsair.dev/mcpOpen Plugins → Add → Add custom connector, name it Corsair, paste the address, select Continue, then Add.Install Corsair from ChatGPT's plugin directory, connect it and sign in. A custom MCP server with the address works too, but personal plans get its read tools only.Add to Cursor / Grok BuildOr add this to~/.cursor/mcp.json. It opens Corsair to sign in the first time it connects.{ "mcpServers": { "corsair": { "url": "https://mcp.corsair.dev/mcp" } } }Run this, then run/mcpin Claude Code to sign in.claude mcp add --transport http corsair https://mcp.corsair.dev/mcpCodex, Antigravity, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client
- 3
Sign in and choose what needs your approval
Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. In the default Cautious mode, X (Twitter)'s read and write operations run right away and its 53 destructive operations wait for your approval. Strict mode asks before every write and refuses destructive operations, and Read mode allows reads only.
FAQ
Install corsair and @corsair-dev/twitter, add the X (Twitter) plugin, and connect with OAuth or an API key. Then call methods like corsair.twitter.api.account.ensure() from your app. Corsair stores tokens, and syncs data per tenant.
Yes. X (Twitter) supports OAuth or an API key. Use credentials or OAuth scopes that match what you automate. Create them in the X (Twitter) developer console, then paste into Corsair or connect through managed auth in Hub.
Yes. One Corsair client can hit X (Twitter), GitHub, Notion, Stripe, and the rest. Trigger X (Twitter) from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.
Teams use Corsair for read and act on X (Twitter) through the full X API v2: publish and search posts, read timelines, mentions, likes, bookmarks and followers, look up and search users, send and read Direct Messages and encrypted Chat, manage Lists, Spaces, Communities, trends, news, Community Notes, live broadcasts and media uploads, and run usage, compliance and webhook routes (259 operations). Common builds include sync jobs, admin tooling, and agents that call X (Twitter) APIs from your backend. Local DB entities let you query synced X (Twitter) records without hitting the API on every read.
The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per X (Twitter) API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.
We maintain @corsair-dev/twitter in the open repo. When X (Twitter) ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.
No. Corsair does not read your X (Twitter) data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store X (Twitter) data on your behalf.
Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.
Yes. Put X (Twitter) on a link in Strict mode and every write waits for your approval, while destructive actions are refused. The default Cautious mode asks only before the 53 destructive X (Twitter) operations. You can change a link's mode at hub.corsair.dev/me.