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.
Adds a specified user to a twitter list. this endpoint allows you to include a user in a curated group of twitter accounts (list). it should be used when you want to expand the membership of a list you own or manage. the endpoint requires the list id and the user id of the account to be added. it’s important to note that you can only add users to lists that you own or have management rights to. this tool doesn’t provide information about the success of the operation or details about the list or user; it simply performs the addition. use this when you need to programmatically update list memberships, such as for maintaining topical groups or organizing followed accounts.
Create compliance job request
Creates a new batch compliance job for checking the compliance status of tweets or users on twitter. this endpoint allows you to initiate large-scale compliance checks, which is crucial for content moderation and user management. use this when you need to verify the compliance status of a large number of tweets or user accounts. the job creation process is asynchronous, meaning you’ll need to check the job status separately after creation. this endpoint is particularly useful for applications dealing with content moderation, safety, and policy enforcement on twitter.
Create list with description option
Creates a new twitter list for organizing and curating tweets. this endpoint allows users to create a personalized list with a specific name, optional description, and privacy setting. it’s useful for grouping accounts or topics of interest, making it easier to follow specific content streams. the created list can be used to aggregate tweets from multiple accounts without necessarily following them individually. note that while the list is created empty, users will need to populate it with members separately using other api endpoints.
Add user to followed lists
Allows an authenticated user to follow a specific twitter list. this endpoint is used when a user wants to subscribe to a curated list of twitter accounts, enabling them to see tweets from those accounts in a dedicated timeline. it’s particularly useful for following topic-specific or curated content streams. the endpoint requires the user’s authentication and the unique identifier of the list they wish to follow. it should not be used to create new lists or modify existing ones. note that following a list does not automatically follow all accounts within that list.
Deletes a specified twitter list associated with the authenticated user’s account. this endpoint should be used when a user wants to permanently remove a list they’ve created, including all its members and followers. it’s particularly useful for managing outdated or unnecessary lists, cleaning up a user’s profile, or removing lists that no longer serve their intended purpose. once a list is deleted, it cannot be recovered, so use this endpoint with caution. this operation does not affect the accounts that were members of the list; it only removes the list itself from the platform.
Delete direct message event by id
Deletes a specific direct message event from a conversation on twitter. this endpoint should be used when a user wants to permanently remove a particular message from their direct message history. it’s useful for managing conversations, removing sensitive or outdated information, or complying with privacy requests. the deletion is irreversible, so use with caution. note that this endpoint only deletes individual message events, not entire conversations. it may not be possible to delete certain system-generated events or messages sent by other users.
Initiates a follow request for the authenticated user to follow another twitter user. this endpoint should be used when a user wants to start following another account, receiving their tweets in their home timeline. it’s particularly useful for building features that allow users to expand their network or for automated follow actions based on certain criteria. note that if the target user has protected tweets, this will send a follow request instead of immediately following. the endpoint does not provide information about the follow status or any details about the target user beyond the follow action.
Create group dm conversation
Creates a new group direct message (dm) conversation on twitter with specified participants and an initial message. this endpoint allows you to start a private group chat with multiple users, supporting both text and media content in the first message. use this when you need to initiate a private group discussion or share content with multiple twitter users simultaneously. the conversation is created immediately, and all specified participants are added to the group. note that this endpoint only creates group conversations; for one-on-one dms, a different endpoint should be used.
Retrieve user pinned lists by id
Retrieves the pinned lists of a specified twitter user. this endpoint allows you to fetch the curated lists that a user has chosen to highlight on their profile. it’s useful for understanding a user’s interests or the content they want to emphasize. the endpoint returns only the pinned lists, not the content of those lists or other user information. use this when you need to know which lists a user considers most important or wants to showcase on their profile.
Retrieves a list of users who follow the specified twitter user. this endpoint allows you to fetch the followers of any public twitter account using their unique user id. it’s particularly useful for analyzing a user’s audience, tracking follower growth, or identifying potential connections. the endpoint returns a paginated list of follower details, which may include user ids, usernames, and other public profile information depending on the api version and authentication level. use this when you need to analyze a user’s follower base or track changes in their audience over time. note that for users with a large number of followers, multiple api calls may be necessary to retrieve the complete list due to pagination limits.
Retrieves the members of a specified twitter list. this endpoint allows you to fetch all users who are part of a given list, providing valuable information about the list’s composition. it’s particularly useful for analyzing audience demographics, finding influential users within a specific topic, or simply managing your lists. the tool returns user objects for each member, which may include details such as user id, screen name, and profile information. use this when you need to examine or export the membership of a twitter list. note that for private lists, authentication as the list owner is required. the response is typically paginated, so multiple calls may be necessary to retrieve all members of large lists.
This endpoint allows a user to mute another user on twitter. when a user is muted, their tweets and retweets will no longer appear in the muting user’s home timeline, although they will still be able to see the muted user’s profile and tweets when visiting their profile directly. this feature is useful for managing unwanted content without the more severe step of blocking. the endpoint should be used when a user wants to reduce their exposure to another user’s content without notifying that user or completely cutting off interaction. it’s important to note that muting is a one-way action and does not prevent the muted user from seeing the muting user’s tweets or interacting with them.
Get user list memberships by id
Retrieves all twitter lists that a specified user is a member of. this endpoint allows you to discover the curated collections of accounts (lists) that a particular user has been added to by other twitter users. it’s useful for understanding a user’s interests, networks, and how they are categorized by the twitter community. the endpoint returns details about each list, such as the list name, description, and owner. use this when you need to analyze a user’s presence across various topical or community-based lists on twitter. note that this endpoint only returns public lists and private lists that the authenticated user has access to view.
Retrieves the bookmarks saved by a specific twitter user. this endpoint allows you to fetch a list of tweets that the user has bookmarked for later reference. it’s useful for applications that need to display or analyze a user’s saved content. the endpoint returns the most recent bookmarks first and supports pagination for handling large sets of bookmarked tweets. it should be used when you need to access a user’s curated list of interesting or important tweets. note that this endpoint only returns the bookmarks and does not provide functionality to add or remove bookmarks.
Retrieves a list of users who have purchased tickets to a specific twitter space. this endpoint is useful for space creators or analysts to gather information about their audience and understand the reach of their paid spaces. it returns details about the buyers, which can be used for analytics, engagement tracking, or follow-up communications. the endpoint should be used after a space with ticketed entry has concluded or while it’s ongoing. it will not provide real-time updates during the space, and it’s limited to spaces that have implemented paid entry.
Post user pinned list by id
This endpoint allows a user to pin a specific list to their twitter profile. it’s used to increase the visibility and quick access to a chosen list for the user and their profile visitors. the endpoint should be called when a user wants to highlight a particular list on their profile. it’s important to note that there’s a limit to how many lists can be pinned (typically up to 5), so this action may fail if the user has reached their maximum number of pinned lists. the endpoint doesn’t provide information about currently pinned lists or remove other pinned lists automatically.
Removes a specific tweet from a user’s bookmarks on twitter. this endpoint allows you to delete a saved tweet from a user’s bookmark list, effectively “un-bookmarking” the tweet. use this when a user wants to remove a previously bookmarked tweet from their saved items. the endpoint requires both the user’s id and the specific tweet id to be removed. it’s important to note that this action is irreversible, and once a bookmark is deleted, it cannot be restored through the api. this endpoint is useful for managing a user’s bookmarks, especially when implementing features like “unsave” or “remove from bookmarks” in twitter client applications.
Retrieves all the lists owned by a specified twitter user. this endpoint allows you to fetch the curated collections of users or tweets that a particular user has created and manages on their twitter account. it’s useful for understanding a user’s interests, content curation, and network on the platform. the endpoint returns details about each list, likely including the list name, description, member count, and other relevant information. use this when you need to analyze a user’s content organization or discover thematic groupings they’ve created. note that this endpoint only returns lists owned by the specified user and does not include lists they’re subscribed to but don’t own. the response may be paginated for users with a large number of owned lists.
Removes a specified user from a twitter list. this endpoint allows list owners to delete a member from their curated list, effectively unsubscribing the user from the list’s content. use this when you need to manage list membership, such as removing inactive users or adjusting the list’s focus. the endpoint requires both the list id and the user id of the member to be removed. it’s important to note that this action can only be performed by the list owner or users with appropriate permissions. the endpoint doesn’t return the updated list information, so a separate call may be needed to verify the change or retrieve the current list members.
Fetch openapi specifications
Retrieves the complete openapi specification for twitter’s api v2 in json format. this endpoint should be used when developers need to access the full api documentation programmatically or when building tools that interact with the twitter api. the specification provides detailed information about all available endpoints, request/response structures, and authentication requirements. it is particularly useful for generating client libraries, setting up api testing environments, or creating interactive api documentation. note that this endpoint returns the raw openapi specification and does not provide any simplified or human-readable documentation; it’s intended for machine consumption and developer tooling.
Post dm messages with attachments
Sends a new direct message to a specific conversation on twitter. this endpoint allows you to post either a text message, media attachments, or both to an existing dm conversation. it’s used when you need to programmatically send private messages to users within a conversation you’re a part of. the endpoint requires either text content or at least one media attachment, making it versatile for various messaging needs. note that media must be uploaded separately and referenced by its media id. this tool doesn’t handle media uploads directly, so ensure you have valid media ids before attaching media to messages.
Post dm conversation message
Sends a new direct message to a specific user in a twitter conversation. this endpoint allows for sending text messages, media attachments, or both. it should be used when initiating or continuing a private conversation with another twitter user. the function requires either a text message, attachments, or both to be provided. it does not support editing or deleting existing messages. note that media must be uploaded separately and referenced by its media id in the attachments array.
Delete user followed lists by list id
This endpoint allows a user to unfollow (stop following) a specific list on twitter. it removes the specified list from the user’s followed lists. use this when a user no longer wants to see tweets from a particular list in their timeline or receive notifications about it. the operation is permanent but can be undone by following the list again using a separate api call. note that this endpoint only affects the user’s relationship with the list and does not delete the list itself or affect other users following it.
Retrieves a list of recent compliance jobs from the twitter api. this endpoint allows you to monitor and manage compliance-related tasks, such as data processing for tweets or users. use this when you need to track the status of compliance jobs, retrieve information about recently created jobs, or filter jobs based on type or status. it’s particularly useful for applications that need to ensure adherence to twitter’s data policies or for managing large-scale data operations. the endpoint does not create new jobs or modify existing ones; it’s purely for retrieval and monitoring purposes.
The searchspaces endpoint allows you to search for twitter spaces based on specified criteria. it’s designed to help developers discover relevant live audio conversations or scheduled spaces on the platform. this endpoint is particularly useful for building discovery experiences, allowing users to find spaces of interest, or for monitoring conversations around specific topics or events. the endpoint supports various search parameters, including a query string, state filters, and the ability to specify which space fields to include in the response. it returns a list of space objects that match the search criteria, providing details such as the space id, title, state (live or scheduled), host information, and participant count. use this endpoint when you need to programmatically find spaces related to particular topics, hosted by specific users, or scheduled for certain times. it’s ideal for applications that aggregate content, provide recommendations, or offer enhanced discovery features for twitter spaces.
Get users blocking status by id
Retrieves a list of users that have been blocked by the specified twitter user. this endpoint is useful for managing user interactions and reviewing a user’s blocking history. it should be used when you need to access or analyze the list of accounts a particular user has chosen to block. the endpoint returns information about blocked users, which may include their user ids, usernames, and other public profile data. note that this endpoint only provides information about users blocked by the specified account and does not allow for blocking or unblocking actions directly.
Delete user muting relationship
This endpoint allows a user to remove a mute relationship with another user on twitter. when a user unmutes a previously muted account, they will once again see the unmuted user’s tweets and notifications in their timeline and interactions. this endpoint should be used when a user decides to re-engage with content from a previously muted account. it’s important to note that this action is reversible, and the user can always re-mute the target user if needed. the endpoint doesn’t provide any information about the mute status before or after the operation, it simply performs the unmute action.
Delete user from following
Removes the follow relationship between two twitter users. this endpoint allows an authenticated user (source user id) to unfollow another user (target user id) on the platform. it should be used when a user wants to stop receiving tweets and updates from the target user in their home timeline. the operation is immediate and irreversible, although the user can choose to follow the target user again in the future if desired. this endpoint doesn’t return any specific data about the unfollow action; it’s primarily used for its side effect of updating the follow relationship. note that this action only affects the source user’s following list and does not impact the target user’s followers count until they refresh their profile.
Retrieve compliance job by id
Retrieves detailed information about a specific compliance job using its unique identifier. this endpoint is part of twitter’s compliance api and is used to check the status and details of a previously created compliance job. it’s particularly useful for tracking the progress of batch compliance checks on tweets or user ids. use this endpoint when you need to monitor the status of a compliance job, retrieve results of completed jobs, or gather information about job parameters and execution details. it’s essential for maintaining large datasets in compliance with twitter’s data policies. the endpoint returns comprehensive information about the job, which may include its current status (e.g., in progress, complete), creation time, job type (e.g., tweets or users), and potentially the results if the job has been completed. however, it does not allow modification of the job or creation of new jobs.
Delete user pinned list by id
Removes a specific list from a user’s pinned lists on their twitter profile. this endpoint allows you to unpin a previously pinned list, effectively removing it from the user’s profile page. use this when a user wants to declutter their profile or change their featured lists. the operation is permanent, but the list itself is not deleted, only unpinned. note that this action can only be performed on lists that are currently pinned by the specified user.
Updates an existing twitter list’s properties. this endpoint allows users to modify the description, name, or privacy setting of a specific list identified by its unique id. it’s useful for maintaining and organizing curated collections of twitter accounts. the endpoint should be used when a user wants to change list details or adjust its visibility. note that this operation only updates the specified fields; any omitted fields will retain their current values.
Retrieve spaces information
Retrieves detailed information about one or more twitter spaces. this endpoint allows developers to fetch real-time data about live audio conversations, including metadata such as host information, participant count, and current status. it’s particularly useful for applications that need to display or analyze active spaces, track engagement, or provide users with up-to-date information about ongoing audio discussions. the endpoint supports querying multiple spaces in a single request, making it efficient for batch retrieval. however, it doesn’t provide functionality to create, modify, or end spaces - it’s purely for data retrieval.
Retrieves a list of users that the specified twitter user is following. this endpoint allows you to explore a user’s social connections and interests by examining who they choose to follow on the platform. it’s particularly useful for social graph analysis, influencer research, or understanding a user’s preferences. the endpoint supports pagination for retrieving large sets of following data and allows customization of the user information returned through field selection. note that this endpoint may be subject to rate limiting, and the number of users returned per request is capped, requiring multiple calls for users with a large following list.
Retrieves a list of users that the specified user has muted on twitter. this endpoint allows you to fetch the accounts that a particular user has chosen to mute, effectively hiding their tweets from their timeline. it’s useful for understanding a user’s content preferences and moderation choices. the endpoint should be used when you need to analyze or display a user’s muting behavior, such as in user management tools or content moderation systems. note that this endpoint only provides information about users who are muted; it does not allow muting or unmuting actions directly. the response likely includes paginated results, so multiple calls may be necessary to retrieve the complete list of muted users.
Retrieves a specific direct message (dm) event from twitter using its unique identifier. this endpoint allows you to fetch detailed information about a single dm event, including its content, participants, and metadata. it’s useful for applications that need to display or analyze individual messages within a dm conversation. the endpoint is part of twitter’s api v2 and requires appropriate authentication to access a user’s private messages. use this when you need to retrieve or display the contents of a specific direct message, or when tracking changes in a dm conversation. note that this endpoint only retrieves a single event at a time; for fetching multiple events or entire conversations, you would need to use a different endpoint.
Retrieves detailed information about a specific twitter space using its unique identifier. this endpoint allows developers to fetch metadata and current status of a space, including its title, creator, host ids, scheduled start time (if applicable), current state (live, scheduled, or ended), and participant count. it’s useful for applications that need to display or analyze information about particular spaces, such as third-party twitter clients or social media analytics tools. the endpoint provides a snapshot of the space at the time of the request and does not provide real-time updates or streaming capabilities. note that this endpoint can only retrieve information for public spaces or those the authenticated user has access to.
Retrieve spaces by creator ids
Retrieves information about twitter spaces created by specified users. this endpoint allows you to fetch details of active, scheduled, or ended spaces associated with given creator ids. it’s particularly useful for monitoring space activities of specific twitter users or for aggregating space data from multiple creators. the endpoint returns space objects containing various attributes such as their current state, title, start time, and more, depending on the fields requested. use this when you need to track or analyze spaces created by known twitter users. note that the endpoint may have rate limits and might not return spaces that have been deleted or are no longer available.
Retrieve user by username
Retrieves detailed information about a twitter user based on their username. this endpoint allows developers to fetch public profile data for a specific user, which can be useful for displaying user information, verifying user existence, or gathering data for analysis. the endpoint should be used when you need to access a user’s profile details, such as their display name, bio, follower count, or other public information associated with their account. it’s important to note that this endpoint only provides publicly available information and does not grant access to private user data or direct messages. the tool is particularly useful for applications that need to display user profiles, verify user identities, or analyze public twitter user data.
Retrieve direct message events by conversation id
Retrieves direct message (dm) events from a specific conversation on twitter. this endpoint allows you to fetch various types of dm events, including messagecreate, participantsjoin, and participantsleave, providing a comprehensive view of the conversation’s history and participant interactions. use this endpoint when you need to analyze or display the contents and activity of a particular dm conversation. it’s particularly useful for applications that manage customer service, chatbots, or social media analytics on twitter. note that this endpoint only retrieves events from a single conversation at a time and may be subject to rate limiting or pagination for conversations with a large number of events.
Retrieves detailed information about a specific twitter user using their unique user id. this endpoint is part of the twitter api v2 and provides access to various attributes of a user’s profile. it should be used when you need comprehensive details about a particular twitter account, such as the user’s name, username, profile description, follower count, and other public information. the endpoint is useful for applications that require up-to-date user data, such as social media management tools, analytics platforms, or user verification systems. note that this endpoint only returns publicly available information and does not provide access to private user data or tweet content.
The getusers endpoint retrieves detailed information about twitter users. it fetches user profiles by ids or usernames, supporting up to 100 users per request. use this endpoint to gather profile details, metrics, and optionally, pinned tweets. it’s ideal for user lookup or displaying profile information, but doesn’t provide real-time updates or streaming.
Retrieve authenticated user information
Retrieves the profile information of the currently authenticated user on twitter. this endpoint is part of the twitter api v2 and provides access to the user’s public profile data, such as username, display name, bio, and other relevant information. it should be used when an application needs to fetch the most up-to-date information about the authenticated user, such as during profile management or user session initialization. the endpoint does not require any additional parameters beyond authentication, making it a simple and direct way to access user data. note that the specific fields returned may depend on the application’s access level and the user’s privacy settings.
Retrieve dm events by participant id
Retrieves direct message (dm) events from a conversation with a specific participant on twitter. this endpoint allows you to fetch various types of dm events, such as message creations, participant joins, and participant leaves, for a one-on-one conversation. it’s particularly useful when you need to access the history or recent activity of a direct message thread with a particular user. the endpoint returns events in chronological order, providing a comprehensive view of the conversation’s timeline. note that this endpoint is limited to retrieving events from conversations between two participants and does not support group dm conversations.
Get user reverse chronological timeline
Retrieves the reverse chronological timeline for a specified twitter user. this endpoint returns the most recent tweets and retweets posted by the user, ordered from newest to oldest. it’s particularly useful for applications that need to display a user’s latest activity or monitor real-time updates from a specific account. the endpoint should be used when you need to fetch the latest tweets for a user without any algorithmic sorting or filtering. it does not include replies or mentions unless they are self-threads or retweets. keep in mind that the number of tweets returned may be limited by twitter’s api constraints, and pagination might be necessary for a complete timeline.
Retrieves a list of users who are followers of a specified twitter list. this endpoint allows you to fetch the users who have chosen to follow and receive updates from a particular curated list on twitter. it’s useful for understanding the audience and reach of a list, as well as for analyzing user interests and network connections. the endpoint returns user information for the list’s followers, which can be used for various purposes such as audience analysis, engagement strategies, or finding potential users to interact with based on shared interests. note that this endpoint only provides information about the followers of the list, not the members or contents of the list itself.
The getusersbyusernames endpoint retrieves detailed information about multiple twitter users based on their usernames. it allows for efficient bulk lookup of user data, supporting up to 100 usernames in a single request. this endpoint is particularly useful for applications that need to fetch user profiles, verify user existence, or gather public metrics for multiple users simultaneously. the response can be customized to include various user fields and even expand pinned tweet information, providing flexibility in the data returned. it’s important to note that this endpoint has rate limits, typically allowing 300 requests per 15-minute window for app-only auth and 900 requests per 15-minute window for user auth. use this endpoint when you need to retrieve user information for known twitter handles, but avoid it for user search functionality.
Retrieves detailed information about a specific twitter list using its unique identifier. this endpoint allows developers to fetch metadata and properties of a particular list, such as its name, description, member count, and follower count. it’s useful when you need to display or update information about a known list in your application. the endpoint provides a snapshot of the list’s current state and does not include information about the list’s members or subscribers. use this when you have a list id and need to access its properties or verify its existence.
Get followed lists by user id
Retrieves a collection of lists that are followed by a specified twitter user. this endpoint allows developers to access information about the curated content a user has chosen to follow, providing insights into their interests and preferences on the platform. it’s particularly useful for applications that aim to analyze user behavior, provide personalized recommendations, or aggregate content based on followed lists. the endpoint returns list metadata, not the actual content of the lists or their tweets. use this when you need to understand a user’s content consumption patterns or when building features that leverage a user’s followed lists for content discovery or social graph analysis.
Get direct message events
Retrieves direct message events from the authenticated user’s twitter account. this endpoint allows you to fetch various types of events related to direct messages, such as new messages, participants joining or leaving conversations. it’s particularly useful for applications that need to monitor or analyze private communications on twitter. the endpoint supports pagination for handling large volumes of events and allows filtering by event type and specific conversations. use this endpoint when you need to access the user’s private message history, track changes in direct message conversations, or build messaging-related features in your application. note that this endpoint only returns events the authenticated user has permission to view and may be subject to rate limiting.