> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boxd.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Twitter

> Twitter, Inc

Twitter, Inc. was an American social media company based in San Francisco, California, which operated and was named for named for its flagship social media network prior to its rebrand as X.

`twitter` · **79 tools** · no triggers

## Connect it

```bash theme={"theme":"github-dark"}
run auth twitter
run auth twitter --scope team    # shared with the organization
```

Or from the [Integrations page](https://app.boxd.sh/integrations) in the console. See [Connections](/guides/integrations/connections) for personal versus shared, and who may remove one.

## Use it

```bash theme={"theme":"github-dark"}
run twitter          # common commands
run twitter --all    # every command
```

```ts theme={"theme":"github-dark"}
import { twitter } from "@boxd/run";
```

## Common tools

| Tool                       | What it does                                                                                                                                                              |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create-list`              | Creates a new, empty List on X (formerly Twitter), for which the provided name must be unique for the authenticated user; accounts are added separately.                  |
| `creation-of-post`         | Creates a Tweet on Twitter; `text` is required unless `card_uri`, `media_media_ids`, `poll_options`, or `quote_tweet_id` is provided.                                     |
| `delete-list`              | Permanently deletes a specified Twitter List using its ID, which must be owned by the authenticated user; this action is irreversible and the list must already exist.    |
| `follow-user`              | Allows an authenticated user (path `id`) to follow another user (`target_user_id`), which results in a pending request if the target user's tweets are protected.         |
| `get-blocked-users`        | Retrieves the authenticated user's own block list. IMPORTANT: You can only retrieve YOUR OWN block list - the `id` parameter must be the authenticated user's ID.         |
| `get-post-analytics`       | Tool to retrieve analytics data for specified Posts within a defined time range.                                                                                          |
| `initialize-media-upload`  | Initialize a media upload session for X/Twitter. Use this to start a chunked media upload process, which returns a media\_id for subsequent APPEND and FINALIZE commands. |
| `post-delete-by-post-id`   | Irreversibly deletes a specific Tweet by its ID; the Tweet may persist in third-party caches after deletion.                                                              |
| `recent-search`            | Searches Tweets from the last 7 days matching a query (using X's search syntax), ideal for real-time analysis, trend monitoring, or retrieving posts...                   |
| `unfollow-user`            | Allows the authenticated user to unfollow an existing Twitter user (`target_user_id`), which removes the follow relationship.                                             |
| `upload-media`             | Upload media (images only) to X/Twitter using the v2 API. Supports tweet\_image, dm\_image, and subtitles media categories only.                                          |
| `user-lookup-by-usernames` | Retrieves detailed information for 1 to 100 Twitter users by their usernames (each 1-15 alphanumeric characters/underscores), allowing customizable...                    |
| `user-lookup-me`           | Returns profile information for the currently authenticated X user, customizable via request fields.                                                                      |

<Accordion title="All 79 tools" icon="list">
  | Tool                                             | What it does                                                                                                                                                              |
  | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `add-list-member`                                | Adds a user to a specified Twitter List; the list must be owned by the authenticated user.                                                                                |
  | `add-post-to-bookmarks`                          | Adds a specified, existing, and accessible Tweet to a user's bookmarks, with success indicated by the 'bookmarked' field in the response.                                 |
  | `append-media-upload`                            | Append data chunk to an ongoing media upload session on X/Twitter.                                                                                                        |
  | `bookmarks-by-user`                              | Retrieves Tweets bookmarked by the authenticated user, where the provided User ID must match the authenticated user's ID.                                                 |
  | `create-activity-subscription`                   | Tool to create a subscription for an X activity event. Use when you need to monitor specific user activities like profile updates, follows, or spaces events.             |
  | `create-compliance-job`                          | Creates a new compliance job to check the status of Tweet or user IDs; upload IDs as a plain text file (one ID per line) to the `upload_url` received in the response.    |
  | `create-dm-conversation`                         | Creates a new group Direct Message (DM) conversation on Twitter.                                                                                                          |
  | `create-list`                                    | Creates a new, empty List on X (formerly Twitter), for which the provided name must be unique for the authenticated user; accounts are added separately.                  |
  | `creation-of-post`                               | Creates a Tweet on Twitter; `text` is required unless `card_uri`, `media_media_ids`, `poll_options`, or `quote_tweet_id` is provided.                                     |
  | `delete-dm`                                      | Permanently deletes a specific Twitter Direct Message (DM) event using its `event_id` if the authenticated user sent it; this action is irreversible...                   |
  | `delete-list`                                    | Permanently deletes a specified Twitter List using its ID, which must be owned by the authenticated user; this action is irreversible and the list must already exist.    |
  | `followers-by-user-id`                           | Retrieves a list of users who follow a specified public Twitter user ID.                                                                                                  |
  | `following-by-user-id`                           | Retrieves users followed by a specific Twitter user, allowing pagination and customization of returned user and tweet data fields via expansions.                         |
  | `follow-list`                                    | Allows the authenticated user (`id`) to follow a specific Twitter List (`list_id`) they are permitted to access, subscribing them to the list's...                        |
  | `follow-user`                                    | Allows an authenticated user (path `id`) to follow another user (`target_user_id`), which results in a pending request if the target user's tweets are protected.         |
  | `full-archive-search`                            | Searches the full archive of public Tweets from March 2006 onwards; use 'start\_time' and 'end\_time' together for a defined time window.                                 |
  | `get-blocked-users`                              | Retrieves the authenticated user's own block list. IMPORTANT: You can only retrieve YOUR OWN block list - the `id` parameter must be the authenticated user's ID.         |
  | `get-compliance-job`                             | Retrieves status, download/upload URLs, and other details for an existing Twitter compliance job specified by its unique ID.                                              |
  | `get-compliance-jobs`                            | Returns a list of recent compliance jobs, filtered by type (tweets or users) and optionally by status.                                                                    |
  | `get-dm-conversation-events`                     | Fetches Direct Message (DM) events for a one-on-one conversation with a specified participant ID, ordered chronologically newest to oldest; does not support group DMs.   |
  | `get-dm-event`                                   | Fetches a specific Direct Message (DM) event by its unique ID, allowing optional expansion of related data like users or tweets; ensure the...                            |
  | `get-list`                                       | Returns metadata for a specific Twitter List, identified by its ID; does not return list members but can expand the owner's User object via the `expansions` parameter.   |
  | `get-list-followers`                             | Fetches a list of users who follow a specific Twitter List, identified by its ID; ensure the authenticated user has access if the list is private.                        |
  | `get-list-members`                               | Fetches members of a specific Twitter List, identified by its unique ID.                                                                                                  |
  | `get-media-upload-status`                        | Get the processing status of uploaded media (videos/GIFs) on X/Twitter.                                                                                                   |
  | `get-muted-users`                                | Returns user objects muted by the X user identified by the `id` path parameter.                                                                                           |
  | `get-openapi-spec`                               | Fetches the OpenAPI specification (JSON) for Twitter's API v2, used to programmatically understand the API's structure for developing client libraries or tools.          |
  | `get-post-analytics`                             | Tool to retrieve analytics data for specified Posts within a defined time range.                                                                                          |
  | `get-post-retweeters-action`                     | Retrieves users who publicly retweeted a specified public Post ID, excluding Quote Tweets and retweets from private accounts.                                             |
  | `get-post-retweets`                              | Retrieves Tweets that Retweeted a specified public or authenticated-user-accessible Tweet ID, optionally customizing the response with fields and expansions.             |
  | `get-post-usage`                                 | Fetches Tweet usage statistics for a Project (e.g., consumption, caps, daily breakdowns for Project & Client Apps) to monitor API limits; data can be...                  |
  | `get-recent-dm-events`                           | Returns recent Direct Message events for the authenticated user, such as new messages or changes in conversation participants.                                            |
  | `get-space-by-id`                                | Retrieves details for a Twitter Space by its ID, allowing for customization and expansion of related data, provided the Space ID is valid and accessible.                 |
  | `get-space-posts`                                | Retrieves Tweets that were shared/posted during a Twitter Space broadcast.                                                                                                |
  | `get-spaces-by-creators`                         | Retrieves Twitter Spaces created by a list of specified User IDs, with options to customize returned data fields.                                                         |
  | `get-spaces-by-ids`                              | Fetches detailed information for one or more Twitter Spaces (live, scheduled, or ended) by their unique IDs; at least one Space ID must be provided.                      |
  | `get-space-ticket-buyers`                        | Retrieves a list of users who purchased tickets for a specific, valid, and ticketed Twitter Space.                                                                        |
  | `get-user-by-id`                                 | Retrieves detailed public information for a Twitter user by their ID, optionally expanding related data (e.g., pinned tweets) and specifying...                           |
  | `get-user-followed-lists`                        | Returns metadata (not Tweets) for lists a specific Twitter user follows, optionally including expanded owner details.                                                     |
  | `get-user-list-memberships`                      | Retrieves all Twitter Lists a specified user is a member of, including public Lists and private Lists the authenticated user is authorized to view.                       |
  | `get-user-owned-lists`                           | Call this action to retrieve Lists created (owned) by a specific Twitter user, not Lists they follow or are subscribed to.                                                |
  | `get-user-pinned-lists`                          | Retrieves the Lists a specific, existing Twitter user has pinned to their profile to highlight them.                                                                      |
  | `get-users-by-ids`                               | Retrieves detailed information for specified X (formerly Twitter) user IDs, optionally customizing returned fields and expanding related entities.                        |
  | `hide-replies`                                   | Hides or unhides an existing reply Tweet. This action allows the authenticated user to hide or unhide a reply to a conversation they own (started).                       |
  | `initialize-media-upload`                        | Initialize a media upload session for X/Twitter. Use this to start a chunked media upload process, which returns a media\_id for subsequent APPEND and FINALIZE commands. |
  | `list-post-likers`                               | Retrieves users who have liked the Post (Tweet) identified by the provided ID.                                                                                            |
  | `list-posts-timeline-by-list-id`                 | Fetches the most recent Tweets posted by members of a specified Twitter List.                                                                                             |
  | `mute-user`                                      | Mutes a target user on behalf of an authenticated user, preventing the target's Tweets and Retweets from appearing in the authenticated user's home...                    |
  | `pin-list`                                       | Pins a specified List to the authenticated user's profile, provided the List exists, the user has access rights, and the pin limit (typically 5 Lists) is not exceeded.   |
  | `post-delete-by-post-id`                         | Irreversibly deletes a specific Tweet by its ID; the Tweet may persist in third-party caches after deletion.                                                              |
  | `post-lookup-by-post-id`                         | Fetches comprehensive details for a single Tweet by its unique ID, provided the Tweet exists and is accessible.                                                           |
  | `post-lookup-by-post-ids`                        | Retrieves detailed information for one or more Posts (Tweets) identified by their unique IDs, allowing selection of specific fields and expansions.                       |
  | `recent-search`                                  | Searches Tweets from the last 7 days matching a query (using X's search syntax), ideal for real-time analysis, trend monitoring, or retrieving posts...                   |
  | `remove-list-member`                             | Removes a user from a Twitter List; the response `is_member` field will be `false` if removal was successful or the user was not a member, and the...                     |
  | `remove-post-from-bookmarks`                     | Removes a Tweet, specified by `tweet_id`, from the authenticated user's bookmarks; the Tweet must have been previously bookmarked by the user for the...                  |
  | `retrieve-dm-conversation-events`                | Retrieves Direct Message (DM) events for a specific conversation ID on Twitter, useful for analyzing messages and participant activities.                                 |
  | `retrieve-posts-that-quote-post`                 | Retrieves Tweets that quote a specified Tweet, requiring a valid Tweet ID.                                                                                                |
  | `returns-post-objects-liked-by-provided-user-id` | Retrieves Tweets liked by a specified Twitter user, provided their liked tweets are public or accessible.                                                                 |
  | `retweet-post`                                   | Retweets a Tweet for the authenticated user. The user ID is automatically fetched from the authenticated session - you only need to provide the tweet\_id to retweet.     |
  | `search-full-archive-counts`                     | Returns a count of Tweets from the full archive that match a specified query, aggregated by day, hour, or minute; `start_time` must be before...                          |
  | `search-recent-counts`                           | Retrieves the count of Tweets matching a specified search query within the last 7 days, aggregated by 'minute', 'hour', or 'day'.                                         |
  | `search-spaces`                                  | Searches for Twitter Spaces by a textual query, optionally filtering by state (live, scheduled, all) to discover audio conversations.                                     |
  | `send-new-message-to-user`                       | Sends a new Direct Message with text and/or media (media\_id for attachments must be pre-uploaded) to a specified Twitter user; this creates a new DM...                  |
  | `send-dm-to-conversation`                        | Sends a message, with optional text and/or media attachments (using pre-uploaded `media_id`s), to a specified Twitter Direct Message conversation.                        |
  | `stream-post-labels`                             | Stream real-time Tweet label events (apply/remove). Requires Enterprise access and App-Only OAuth 2.0 auth.                                                               |
  | `unfollow-list`                                  | Enables a user (via `id`) to unfollow a specific Twitter List (via `list_id`), which removes its tweets from their timeline and stops related...                          |
  | `unfollow-user`                                  | Allows the authenticated user to unfollow an existing Twitter user (`target_user_id`), which removes the follow relationship.                                             |
  | `unlike-post`                                    | Allows an authenticated user (`id`) to remove their like from a specific post (`tweet_id`); the action is idempotent and completes successfully even...                   |
  | `unmute-user`                                    | Unmutes a target user for the authenticated user, allowing them to see Tweets and notifications from the target user again.                                               |
  | `unpin-list`                                     | Unpins a List (specified by list\_id) from the authenticated user's profile.                                                                                              |
  | `unretweet-post`                                 | Removes a user's retweet of a specified Post, if the user had previously retweeted it.                                                                                    |
  | `update-list`                                    | Updates an existing Twitter List's name, description, or privacy status, requiring the List ID and at least one mutable property.                                         |
  | `upload-large-media`                             | Use this to upload a single media file to X/Twitter. Automatically uses chunked upload for GIFs, videos, and images larger than 5 MB.                                     |
  | `upload-media`                                   | Upload media (images only) to X/Twitter using the v2 API. Supports tweet\_image, dm\_image, and subtitles media categories only.                                          |
  | `user-home-timeline-by-user-id`                  | Retrieves the home timeline (reverse chronological feed) for the authenticated Twitter user.                                                                              |
  | `user-like-post`                                 | Allows the authenticated user to like a specific, accessible Tweet, provided neither user has blocked the other and the authenticated user is not restricted from liking. |
  | `user-lookup-by-username`                        | Fetches public profile information for a valid and existing Twitter user by their username, optionally expanding related data like pinned Tweets...                       |
  | `user-lookup-by-usernames`                       | Retrieves detailed information for 1 to 100 Twitter users by their usernames (each 1-15 alphanumeric characters/underscores), allowing customizable...                    |
  | `user-lookup-me`                                 | Returns profile information for the currently authenticated X user, customizable via request fields.                                                                      |
</Accordion>

[Open Twitter in the console →](https://app.boxd.sh/integrations/detail/twitter)
