@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api X API v2
@base https://api.x.com
@version 2.159
@auth Bearer | OAuth2 | Oauth
@endpoints 156
@hint download_for_search
@toc 2(156)

@endpoint POST /2/account_activity/replay/webhooks/{webhook_id}/subscriptions/all
@desc Create replay job
@required {webhook_id: str # The unique identifier for the webhook configuration., from_date: str # The oldest (starting) UTC timestamp (inclusive) from which events will be provided, in `yyyymmddhhmm` format., to_date: str # The latest (ending) UTC timestamp (exclusive) up to which events will be provided, in `yyyymmddhhmm` format.}
@returns(200) {created_at: str(date-time), job_id: str} # The request has succeeded.

@endpoint GET /2/account_activity/subscriptions/count
@desc Get subscription count
@returns(200) {data: map{account_name: str, provisioned_count: str, subscriptions_count_all: str, subscriptions_count_direct_messages: str}, errors: [map]} # The request has succeeded.

@endpoint GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all
@desc Validate subscription
@required {webhook_id: str # The webhook ID to check subscription against.}
@returns(200) {data: map{subscribed: bool}, errors: [map]} # The request has succeeded.

@endpoint POST /2/account_activity/webhooks/{webhook_id}/subscriptions/all
@desc Create subscription
@required {webhook_id: str # The webhook ID to check subscription against.}
@returns(200) {data: map{subscribed: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all/list
@desc Get subscriptions
@required {webhook_id: str # The webhook ID to pull subscriptions for.}
@returns(200) {data: map{application_id: str, subscriptions: [map], webhook_id: str, webhook_url: str}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all
@desc Delete subscription
@required {webhook_id: str # The webhook ID to check subscription against., user_id: str # User ID to unsubscribe from.}
@returns(200) {data: map{subscribed: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/activity/stream
@desc Activity Stream
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided.}
@returns(200) {data: map{event_type: str, event_uuid: str, filter: map{keyword: str, user_id: str}, payload: any, tag: str}, errors: [map]} # The request has succeeded.

@endpoint GET /2/activity/subscriptions
@desc Get X activity subscriptions
@optional {max_results: int(int32) # The maximum number of results to return per page., pagination_token: str # This parameter is used to get the next 'page' of results.}
@returns(200) {data: [map], errors: [map], meta: map{next_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/activity/subscriptions
@desc Create X activity subscription
@required {event_type: str(profile.update.bio/profile.update.profile_picture/profile.update.banner_picture/profile.update.screenname/profile.update.geo/profile.update.url/profile.update.verified_badge/profile.update.affiliate_badge/profile.update.handle/news.new/follow.follow/follow.unfollow/spaces.start/spaces.end/chat.received/chat.sent/ProfileBioUpdate/ProfilePictureUpdate/ProfileBannerPictureUpdate/ProfileScreennameUpdate/ProfileGeoUpdate/ProfileUrlUpdate/ProfileVerifiedBadgeUpdate/NewsNew/FollowFollow/FollowUnfollow), filter: map{keyword: str, user_id: str} # An XAA subscription.}
@optional {tag: str, webhook_id: str # The unique identifier of this webhook config.}
@returns(200) {data: map{subscription: map{created_at: str(date-time), event_type: str, filter: map{keyword: str, user_id: str}, subscription_id: str, tag: str, updated_at: str(date-time), webhook_id: str}, total_subscriptions_for_instance_id: int}, errors: [map], meta: map{total_subscriptions: int(int32)}} # The request has succeeded.

@endpoint DELETE /2/activity/subscriptions/{subscription_id}
@desc Deletes X activity subscription
@required {subscription_id: str # The ID of the subscription to delete.}
@returns(200) {data: map{deleted: bool}, errors: [map], meta: map{total_subscriptions: int(int32)}} # The request has succeeded.

@endpoint PUT /2/activity/subscriptions/{subscription_id}
@desc Update X activity subscription
@required {subscription_id: str # The ID of the subscription to update.}
@optional {tag: str, webhook_id: str # The unique identifier of this webhook config.}
@returns(200) {data: map{subscription: map{created_at: str(date-time), event_type: str, filter: map{keyword: str, user_id: str}, subscription_id: str, tag: str, updated_at: str(date-time), webhook_id: str}, total_subscriptions: int(int32)}} # The request has succeeded.

@endpoint GET /2/chat/conversations
@desc Get Chat Conversations
@optional {max_results: int(int32)=10 # Maximum number of conversations to return., pagination_token: str # Token for pagination to retrieve the next page of results., chat_conversation.fields: [str] # A comma separated list of ChatConversation fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{users: [map]}, meta: map{has_message_requests: bool, next_token: str, result_count: int}} # The request has succeeded.

@endpoint GET /2/chat/conversations/{conversation_id}
@desc Get Chat Conversation
@required {conversation_id: str # The Chat conversation ID.}
@optional {max_results: int(int32)=10 # Maximum number of message events to return., pagination_token: str # Token for pagination to retrieve the next page of results., chat_message_event.fields: [str] # A comma separated list of ChatMessageEvent fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{has_more: bool, missing_conversation_key_change_events: [str], next_token: str, result_count: int}} # The request has succeeded.

@endpoint POST /2/chat/conversations/{conversation_id}/messages
@desc Send Chat Message
@required {conversation_id: str # The Chat conversation ID., encoded_message_create_event: str # Base64-encoded Thrift MessageCreateEvent containing encrypted message contents., message_id: str # Unique identifier for this message.}
@optional {conversation_token: str # Optional conversation token., encoded_message_event_signature: str # Base64-encoded Thrift MessageEventSignature for message verification.}
@returns(201) {data: map{encoded_message_event: str}, errors: [map]} # The request has succeeded.

@endpoint POST /2/chat/conversations/{conversation_id}/read
@desc Mark Conversation as Read
@required {conversation_id: str # The Chat conversation ID., seen_until_sequence_id: str # The sequence ID of the last message to mark as read up to.}
@returns(200) {data: map{success: bool}, errors: [map]} # The request has succeeded.

@endpoint POST /2/chat/conversations/{conversation_id}/typing
@desc Send Typing Indicator
@required {conversation_id: str # The Chat conversation ID.}
@returns(200) {data: map{success: bool}, errors: [map]} # The request has succeeded.

@endpoint POST /2/chat/media/upload/initialize
@desc Initialize Chat Media Upload
@optional {conversation_id: str # XChat conversation identifier for the upload., total_bytes: int # Total size of the media upload in bytes.}
@returns(200) {data: map{conversation_id: str, media_hash_key: str, session_id: str}} # The request has succeeded.

@endpoint POST /2/chat/media/upload/{id}/append
@desc Append Chat Media Upload
@required {id: str # The session/resume id from initialize.}
@returns(200) {data: map{expires_at: int(int64)}, errors: [map]} # The request has succeeded.

@endpoint POST /2/chat/media/upload/{id}/finalize
@desc Finalize Chat Media Upload
@required {id: str # The session/resume id from initialize.}
@optional {conversation_id: str # XChat conversation identifier for the upload., media_hash_key: str # Media hash key returned from initialize., message_id: str # Optional message identifier associated with the upload., num_parts: str # Total number of uploaded parts as a numeric string., ttl_msec: str # Optional TTL for the media in milliseconds.}
@returns(200) {data: map{success: bool}} # The request has succeeded.

@endpoint GET /2/chat/media/{conversation_id}/{media_hash_key}
@desc Download Chat Media
@required {conversation_id: str # The Chat conversation ID., media_hash_key: str # The media hash key returned from the upload initialize step.}
@returns(200) {data: str, errors: [map]} # The request has succeeded.

@endpoint GET /2/communities/search
@desc Search Communities
@required {query: str # Query to search communities.}
@optional {max_results: int(int32)=10 # The maximum number of search results to be returned by a request., next_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., pagination_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., community.fields: [str] # A comma separated list of Community fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{next_token: str}} # The request has succeeded.

@endpoint GET /2/communities/{id}
@desc Get Community by ID
@required {id: str # The ID of the Community.}
@optional {community.fields: [str] # A comma separated list of Community fields to display.}
@returns(200) {data: map{created_at: str(date-time), id: str, name: str}, errors: [map]} # The request has succeeded.

@endpoint GET /2/compliance/jobs
@desc Get Compliance Jobs
@required {type: str(tweets/users) # Type of Compliance Job to list.}
@optional {status: str(created/in_progress/failed/complete) # Status of Compliance Job to list., compliance_job.fields: [str] # A comma separated list of ComplianceJob fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/compliance/jobs
@desc Create Compliance Job
@required {type: str(tweets/users) # Type of compliance job to list.}
@optional {name: str # User-provided name for a compliance job., resumable: bool # If true, this endpoint will return a pre-signed URL with resumable uploads enabled.}
@returns(200) {data: map{created_at: str(date-time), download_expires_at: str(date-time), download_url: str(uri), id: str, name: str, status: str, type: str, upload_expires_at: str(date-time), upload_url: str(uri)}, errors: [map]} # The request has succeeded.

@endpoint GET /2/compliance/jobs/{id}
@desc Get Compliance Job by ID
@required {id: str # The ID of the Compliance Job to retrieve.}
@optional {compliance_job.fields: [str] # A comma separated list of ComplianceJob fields to display.}
@returns(200) {data: map{created_at: str(date-time), download_expires_at: str(date-time), download_url: str(uri), id: str, name: str, status: str, type: str, upload_expires_at: str(date-time), upload_url: str(uri)}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/connections
@desc Terminate multiple connections
@required {uuids: [str] # Array of connection UUIDs to terminate}
@returns(200) {data: map{failed_kills: int, results: [map], successful_kills: int}, errors: [map]} # The request has succeeded.

@endpoint GET /2/connections
@desc Get Connection History
@optional {status: str(active/inactive/all)=active # Filter by connection status. Use 'active' for current connections, 'inactive' for historical/disconnected connections, or 'all' for both., endpoints: [str] # Filter by streaming endpoint. Specify one or more endpoint names to filter results., max_results: int(int32)=10 # The maximum number of results to return per page., pagination_token: str # Token for paginating through results. Use the value from 'next_token' in the previous response., connection.fields: [str] # A comma separated list of Connection fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{next_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint DELETE /2/connections/all
@desc Terminate all connections
@returns(200) {data: map{failed_kills: int, results: [map], successful_kills: int}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/connections/{endpoint_id}
@desc Terminate connections by endpoint
@required {endpoint_id: str(filtered_stream/sample_stream/sample10_stream/firehose_stream/tweets_compliance_stream/users_compliance_stream/tweet_label_stream/firehose_stream_lang_en/firehose_stream_lang_ja/firehose_stream_lang_ko/firehose_stream_lang_pt/likes_firehose_stream/likes_sample10_stream/likes_compliance_stream) # The endpoint ID to terminate connections for.}
@returns(200) {data: map{failed_kills: int, results: [map], successful_kills: int}, errors: [map]} # The request has succeeded.

@endpoint POST /2/dm_conversations
@desc Create DM conversation
@required {conversation_type: str # The conversation type that is being created., message: any, participant_ids: [str] # Participants for the DM Conversation.}
@returns(201) {data: map{dm_conversation_id: str, dm_event_id: str}, errors: [map]} # The request has succeeded.

@endpoint GET /2/dm_conversations/with/{participant_id}/dm_events
@desc Get DM events for a DM conversation
@required {participant_id: str # The ID of the participant user for the One to One DM conversation.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., event_types: [str]=['MessageCreate', 'ParticipantsLeave', 'ParticipantsJoin'] # The set of event_types to include in the results., dm_event.fields: [str] # A comma separated list of DmEvent fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., user.fields: [str] # A comma separated list of User fields to display., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/dm_conversations/with/{participant_id}/messages
@desc Create DM message by participant ID
@required {participant_id: str # The ID of the recipient user that will receive the DM.}
@returns(201) {data: map{dm_conversation_id: str, dm_event_id: str}, errors: [map]} # The request has succeeded.

@endpoint POST /2/dm_conversations/{dm_conversation_id}/messages
@desc Create DM message by conversation ID
@required {dm_conversation_id: str # The DM Conversation ID.}
@returns(201) {data: map{dm_conversation_id: str, dm_event_id: str}, errors: [map]} # The request has succeeded.

@endpoint GET /2/dm_conversations/{id}/dm_events
@desc Get DM events for a DM conversation
@required {id: str # The DM conversation ID.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., event_types: [str]=['MessageCreate', 'ParticipantsLeave', 'ParticipantsJoin'] # The set of event_types to include in the results., dm_event.fields: [str] # A comma separated list of DmEvent fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., user.fields: [str] # A comma separated list of User fields to display., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/dm_events
@desc Get DM events
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., event_types: [str]=['MessageCreate', 'ParticipantsLeave', 'ParticipantsJoin'] # The set of event_types to include in the results., dm_event.fields: [str] # A comma separated list of DmEvent fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., user.fields: [str] # A comma separated list of User fields to display., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint DELETE /2/dm_events/{event_id}
@desc Delete DM event
@required {event_id: str # The ID of the direct-message event to delete.}
@returns(200) {data: map{deleted: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/dm_events/{event_id}
@desc Get DM event by ID
@required {event_id: str # dm event id.}
@optional {dm_event.fields: [str] # A comma separated list of DmEvent fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., user.fields: [str] # A comma separated list of User fields to display., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: map{attachments: map{card_ids: [str], media_keys: [str]}, cashtags: [any], created_at: str(date-time), dm_conversation_id: str, event_type: str, hashtags: [any], id: str, mentions: [any], participant_ids: [str], referenced_tweets: [map], sender_id: str, text: str, urls: [any]}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint POST /2/evaluate_note
@desc Evaluate a Community Note
@required {note_text: str # Text for the community note., post_id: str # Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.}
@returns(200) {data: map{claim_opinion_score: num(double)}, errors: [map]} # The request has succeeded.

@endpoint GET /2/insights/28hr
@desc Get 28-hour Post insights
@required {tweet_ids: [str] # List of PostIds for 28hr metrics., granularity: str(Daily/Hourly/Weekly/Total) # granularity of metrics response., requested_metrics: [str] # request metrics for historical request.}
@optional {engagement.fields: [str] # A comma separated list of Engagement fields to display.}
@returns(200) {data: [map], errors: [map]} # The request has succeeded.

@endpoint GET /2/insights/historical
@desc Get historical Post insights
@required {tweet_ids: [str] # List of PostIds for historical metrics., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range., granularity: str(Daily/Hourly/Weekly/Total) # granularity of metrics response., requested_metrics: [str] # request metrics for historical request.}
@optional {engagement.fields: [str] # A comma separated list of Engagement fields to display.}
@returns(200) {data: [map], errors: [map]} # The request has succeeded.

@endpoint GET /2/likes/compliance/stream
@desc Stream Likes compliance data
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided.}
@returns(200) The request has succeeded.

@endpoint GET /2/likes/firehose/stream
@desc Stream all Likes
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., like_with_tweet_author.fields: [str] # A comma separated list of LikeWithTweetAuthor fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: map{created_at: str(date-time), id: str, liked_tweet_id: str, timestamp_ms: int(int32), tweet_author_id: str}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/likes/sample10/stream
@desc Stream sampled Likes
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., like_with_tweet_author.fields: [str] # A comma separated list of LikeWithTweetAuthor fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: map{created_at: str(date-time), id: str, liked_tweet_id: str, timestamp_ms: int(int32), tweet_author_id: str}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint POST /2/lists
@desc Create List
@required {name: str}
@optional {description: str, private: bool=False}
@returns(200) {data: map{id: str, name: str}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/lists/{id}
@desc Delete List
@required {id: str # The ID of the List to delete.}
@returns(200) {data: map{deleted: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/lists/{id}
@desc Get List by ID
@required {id: str # The ID of the List.}
@optional {list.fields: [str] # A comma separated list of List fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display.}
@returns(200) {data: map{created_at: str(date-time), description: str, follower_count: int, id: str, member_count: int, name: str, owner_id: str, private: bool}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint PUT /2/lists/{id}
@desc Update List
@required {id: str # The ID of the List to modify.}
@optional {description: str, name: str, private: bool}
@returns(200) {data: map{updated: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/lists/{id}/followers
@desc Get List followers
@required {id: str # The ID of the List.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/lists/{id}/members
@desc Get List members
@required {id: str # The ID of the List.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/lists/{id}/members
@desc Add List member
@required {id: str # The ID of the List for which to add a member., user_id: str # Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.}
@returns(200) {data: map{is_member: bool}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/lists/{id}/members/{user_id}
@desc Remove List member
@required {id: str # The ID of the List to remove a member., user_id: str # The ID of User that will be removed from the List.}
@returns(200) {data: map{is_member: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/lists/{id}/tweets
@desc Get List Posts
@required {id: str # The ID of the List.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/media
@desc Get Media by media keys
@required {media_keys: [str] # A comma separated list of Media Keys. Up to 100 are allowed in a single request.}
@optional {media.fields: [str] # A comma separated list of Media fields to display.}
@returns(200) {data: [map], errors: [map]} # The request has succeeded.

@endpoint GET /2/media/analytics
@desc Get Media analytics
@required {media_keys: [str] # A comma separated list of Media Keys. Up to 100 are allowed in a single request., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range., granularity: str(hourly/daily/total)=daily # The granularity for the search counts results.}
@optional {media_analytics.fields: [str] # A comma separated list of MediaAnalytics fields to display.}
@returns(200) {data: [map], errors: [map]} # The request has succeeded.

@endpoint POST /2/media/metadata
@desc Create Media metadata
@required {id: str # The unique identifier of this Media.}
@optional {metadata: map{allow_download_status: map{allow_download: bool}, alt_text: map{text!: str}, audience_policy: map{creator_subscriptions: [str], x_subscriptions: [str]}, content_expiration: map{timestamp_sec!: num(long)}, domain_restrictions: map{whitelist!: [str]}, found_media_origin: map{id!: str, provider!: str}, geo_restrictions: any, management_info: map{managed!: bool}, preview_image: map{media_key!: map}, sensitive_media_warning: map{adult_content: bool, graphic_violence: bool, other: bool}, shared_info: map{shared!: bool}, sticker_info: map{stickers!: [map]}, upload_source: map{upload_source!: str}}}
@returns(200) {data: map{associated_metadata: map{allow_download_status: map{allow_download: bool}, alt_text: map{text: str}, audience_policy: map{creator_subscriptions: [str], x_subscriptions: [str]}, content_expiration: map{timestamp_sec: num(long)}, domain_restrictions: map{whitelist: [str]}, found_media_origin: map{id: str, provider: str}, geo_restrictions: any, management_info: map{managed: bool}, preview_image: map{media_key: map}, sensitive_media_warning: map{adult_content: bool, graphic_violence: bool, other: bool}, shared_info: map{shared: bool}, sticker_info: map{stickers: [map]}, upload_source: map{upload_source: str}}, id: str}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/media/subtitles
@desc Delete Media subtitles
@optional {id: str # The unique identifier of this Media., language_code: str # The language code should be a BCP47 code (e.g. 'EN", "SP"), media_category: str(AmplifyVideo/TweetVideo) # The media category of uploaded media to which subtitles should be added/deleted}
@returns(200) {data: map{deleted: bool}, errors: [map]} # The request has succeeded.

@endpoint POST /2/media/subtitles
@desc Create Media subtitles
@optional {id: str # The unique identifier of this Media., media_category: str(AmplifyVideo/TweetVideo) # The media category of uploaded media to which subtitles should be added/deleted, subtitles: map{display_name: str, id: str, language_code: str}}
@returns(200) {data: map{associated_subtitles: [map], id: str, media_category: str}, errors: [map]} # The request has succeeded.

@endpoint GET /2/media/upload
@desc Get Media upload status
@required {media_id: str # Media id for the requested media upload status.}
@optional {command: str # The command for the media upload request.}
@returns(200) {data: map{expires_after_secs: int(int32), id: str, media_key: str, processing_info: map{check_after_secs: int(int32), progress_percent: int(int32), state: str}, size: int(int32)}, errors: [map]} # The request has succeeded.

@endpoint POST /2/media/upload
@desc Upload media
@required {media: any, media_category: str(tweet_image/dm_image/subtitles) # A string enum value which identifies a media use-case. This identifier is used to enforce use-case specific constraints (e.g. file size) and enable advanced features.}
@optional {additional_owners: [str], media_type: str(text/srt/text/vtt/image/jpeg/image/bmp/image/png/image/webp/image/pjpeg/image/tiff) # The type of image or subtitle., shared: bool=False # Whether this media is shared or not.}
@returns(200) {data: map{expires_after_secs: int(int32), id: str, media_key: str, processing_info: map{check_after_secs: int(int32), progress_percent: int(int32), state: str}, size: int(int32)}, errors: [map]} # The request has succeeded.

@endpoint POST /2/media/upload/initialize
@desc Initialize media upload
@optional {additional_owners: [str], media_category: str(amplify_video/tweet_gif/tweet_image/tweet_video/dm_gif/dm_image/dm_video/subtitles) # A string enum value which identifies a media use-case. This identifier is used to enforce use-case specific constraints (e.g. file size, video duration) and enable advanced features., media_type: str(video/mp4/video/webm/video/mp2t/video/quicktime/text/srt/text/vtt/image/jpeg/image/gif/image/bmp/image/png/image/webp/image/pjpeg/image/tiff/model/gltf-binary/model/vnd.usdz+zip) # The type of media., shared: bool # Whether this media is shared or not., total_bytes: int # The total size of the media upload in bytes.}
@returns(200) {data: map{expires_after_secs: int(int32), id: str, media_key: str, processing_info: map{check_after_secs: int(int32), progress_percent: int(int32), state: str}, size: int(int32)}, errors: [map]} # The request has succeeded.

@endpoint POST /2/media/upload/{id}/append
@desc Append Media upload
@required {id: str # The media identifier for the media to perform the append operation.}
@returns(200) {data: map{expires_at: int(int64)}, errors: [map]} # The request has succeeded.

@endpoint POST /2/media/upload/{id}/finalize
@desc Finalize Media upload
@required {id: str # The media id of the targeted media to finalize.}
@returns(200) {data: map{expires_after_secs: int(int32), id: str, media_key: str, processing_info: map{check_after_secs: int(int32), progress_percent: int(int32), state: str}, size: int(int32)}, errors: [map]} # The request has succeeded.

@endpoint GET /2/media/{media_key}
@desc Get Media by media key
@required {media_key: str # A single Media Key.}
@optional {media.fields: [str] # A comma separated list of Media fields to display.}
@returns(200) {data: map{height: int, media_key: str, type: str, width: int}, errors: [map]} # The request has succeeded.

@endpoint GET /2/news/search
@desc Search News
@required {query: str # The search query.}
@optional {max_results: int(int32)=10 # The number of results to return., max_age_hours: int(int32)=168 # The maximum age of the News story to search for., news.fields: [str] # A comma separated list of News fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/news/{id}
@desc Get news stories by ID
@required {id: str # The ID of the news story.}
@optional {news.fields: [str] # A comma separated list of News fields to display.}
@returns(200) {data: map{category: str, cluster_posts_results: [map], contexts: map{entities: map{events: [str], organizations: [str], people: [str], places: [str], products: [str]}, finance: map{tickers: [str]}, sports: map{teams: [str]}, topics: [str]}, disclaimer: str, hook: str, keywords: [str], last_updated_at_ms: str(date-time), name: str, rest_id: str, summary: str}, errors: [map]} # The request has succeeded.

@endpoint POST /2/notes
@desc Create a Community Note
@required {info: map{classification!: str, misleading_tags!: [str], text!: str, trustworthy_sources!: bool} # A X Community Note is a note on a Post., post_id: str # Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers., test_mode: bool # If true, the note being submitted is only for testing the capability of the bot, and won't be publicly visible. If false, the note being submitted will be a new proposed note on the product.}
@returns(200) {data: map{id: str}, errors: [map]} # The request has succeeded.

@endpoint GET /2/notes/search/notes_written
@desc Search for Community Notes Written
@required {test_mode: bool # If true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product.}
@optional {pagination_token: str # Pagination token to get next set of posts eligible for notes., max_results: int(int32)=10 # Max results to return., note.fields: [str] # A comma separated list of Note fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{next_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/notes/search/posts_eligible_for_notes
@desc Search for Posts Eligible for Community Notes
@required {test_mode: bool # If true, return a list of posts that are for the test. If false, return a list of posts that the bots can write proposed notes on the product.}
@optional {pagination_token: str # Pagination token to get next set of posts eligible for notes., max_results: int(int32)=10 # Max results to return., post_selection: str # The selection of posts to return. Valid values are 'feed_size: [small|large|xl], feed_lang: [en|es|...|all]'. Default (if not specified) is 'feed_size: small, feed_lang: en'. Only top AI writers have access to large and xl size feeds., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint DELETE /2/notes/{id}
@desc Delete a Community Note
@required {id: str # The community note id to delete.}
@returns(200) {data: map{deleted: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/openapi.json
@desc Get OpenAPI Spec.
@returns(200) The request was successful

@endpoint GET /2/spaces
@desc Get Spaces by IDs
@required {ids: [str] # The list of Space IDs to return.}
@optional {space.fields: [str] # A comma separated list of Space fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display., topic.fields: [str] # A comma separated list of Topic fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/spaces/by/creator_ids
@desc Get Spaces by creator IDs
@required {user_ids: [str] # The IDs of Users to search through.}
@optional {space.fields: [str] # A comma separated list of Space fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display., topic.fields: [str] # A comma separated list of Topic fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/spaces/search
@desc Search Spaces
@required {query: str # The search query.}
@optional {state: str(live/scheduled/all)=all # The state of Spaces to search for., max_results: int(int32)=100 # The number of results to return., space.fields: [str] # A comma separated list of Space fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display., topic.fields: [str] # A comma separated list of Topic fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/spaces/{id}
@desc Get space by ID
@required {id: str # The ID of the Space to be retrieved.}
@optional {space.fields: [str] # A comma separated list of Space fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display., topic.fields: [str] # A comma separated list of Topic fields to display.}
@returns(200) {data: map{created_at: str(date-time), creator_id: str, ended_at: str(date-time), host_ids: [str], id: str, invited_user_ids: [str], is_ticketed: bool, lang: str, participant_count: int(int32), scheduled_start: str(date-time), speaker_ids: [str], started_at: str(date-time), state: str, subscriber_count: int(int32), title: str, topics: [map], updated_at: str(date-time)}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/spaces/{id}/buyers
@desc Get Space ticket buyers
@required {id: str # The ID of the Space to be retrieved.}
@optional {pagination_token: str # This parameter is used to get a specified 'page' of results., max_results: int(int32)=100 # The maximum number of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/spaces/{id}/tweets
@desc Get Space Posts
@required {id: str # The ID of the Space to be retrieved.}
@optional {max_results: int(int32)=100 # The number of Posts to fetch from the provided space. If not provided, the value will default to the maximum of 100., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/trends/by/woeid/{woeid}
@desc Get Trends by WOEID
@required {woeid: int(int32) # The WOEID of the place to lookup a trend for.}
@optional {max_trends: int(int32)=20 # The maximum number of results., trend.fields: [str] # A comma separated list of Trend fields to display.}
@returns(200) {data: [map], errors: [map]} # The request has succeeded.

@endpoint GET /2/tweets
@desc Get Posts by IDs
@required {ids: [str] # A comma separated list of Post IDs. Up to 100 are allowed in a single request.}
@optional {tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint POST /2/tweets
@desc Create or Edit Post
@optional {card_uri: str # Card Uri Parameter. This is mutually exclusive from Quote Tweet Id, Poll, Media, and Direct Message Deep Link., community_id: str # The unique identifier of this Community., direct_message_deep_link: str # Link to take the conversation from the public timeline to a private Direct Message., edit_options: map{previous_post_id!: str} # Options for editing an existing Post. When provided, this request will edit the specified Post instead of creating a new one., for_super_followers_only: bool=False # Exclusive Tweet for super followers., geo: map{place_id: str} # Place ID being attached to the Tweet for geo location., media: map{media_ids!: [str], tagged_user_ids: [str]} # Media information being attached to created Tweet. This is mutually exclusive from Quote Tweet Id, Poll, and Card URI., nullcast: bool=False # Nullcasted (promoted-only) Posts do not appear in the public timeline and are not served to followers., poll: map{duration_minutes!: int(int32), options!: [str], reply_settings: str} # Poll options for a Tweet with a poll. This is mutually exclusive from Media, Quote Tweet Id, and Card URI., quote_tweet_id: str # Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers., reply: map{auto_populate_reply_metadata: bool, exclude_reply_user_ids: [str], in_reply_to_tweet_id!: str} # Tweet information of the Tweet being replied to., reply_settings: str(following/mentionedUsers/subscribers/verified) # Settings to indicate who can reply to the Tweet., share_with_followers: bool=False # Share community post with followers too., text: str # The content of the Tweet.}
@returns(201) {data: map{id: str, text: str}, errors: [map]} # The request has succeeded.

@endpoint GET /2/tweets/analytics
@desc Get Post analytics
@required {ids: [str] # A comma separated list of Post IDs. Up to 100 are allowed in a single request., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range., granularity: str(hourly/daily/weekly/total)=total # The granularity for the search counts results.}
@optional {analytics.fields: [str] # A comma separated list of Analytics fields to display.}
@returns(200) {data: [map], errors: [map]} # The request has succeeded.

@endpoint GET /2/tweets/compliance/stream
@desc Stream Posts compliance data
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Post Compliance events will be provided.}
@returns(200) The request has succeeded.

@endpoint GET /2/tweets/counts/all
@desc Get count of all Posts
@required {query: str # One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length.}
@optional {start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute)., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute)., since_id: str # Returns results with a Post ID greater than (that is, more recent than) the specified ID., until_id: str # Returns results with a Post ID less than (that is, older than) the specified ID., next_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., pagination_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., granularity: str(minute/hour/day)=hour # The granularity for the search counts results., search_count.fields: [str] # A comma separated list of SearchCount fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{newest_id: str, next_token: str, oldest_id: str, total_tweet_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/tweets/counts/recent
@desc Get count of recent Posts
@required {query: str # One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length.}
@optional {start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute)., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute)., since_id: str # Returns results with a Post ID greater than (that is, more recent than) the specified ID., until_id: str # Returns results with a Post ID less than (that is, older than) the specified ID., next_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., pagination_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., granularity: str(minute/hour/day)=hour # The granularity for the search counts results., search_count.fields: [str] # A comma separated list of SearchCount fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{newest_id: str, next_token: str, oldest_id: str, total_tweet_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/tweets/firehose/stream
@desc Stream all Posts
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/tweets/firehose/stream/lang/en
@desc Stream English Posts
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/tweets/firehose/stream/lang/ja
@desc Stream Japanese Posts
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/tweets/firehose/stream/lang/ko
@desc Stream Korean Posts
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/tweets/firehose/stream/lang/pt
@desc Stream Portuguese Posts
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/tweets/label/stream
@desc Stream Post labels
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided.}
@returns(200) The request has succeeded.

@endpoint GET /2/tweets/sample/stream
@desc Stream sampled Posts
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/tweets/sample10/stream
@desc Stream 10% sampled Posts
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/tweets/search/all
@desc Search all Posts
@required {query: str # One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length.}
@optional {start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute)., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute)., since_id: str # Returns results with a Post ID greater than (that is, more recent than) the specified ID., until_id: str # Returns results with a Post ID less than (that is, older than) the specified ID., max_results: int(int32)=10 # The maximum number of search results to be returned by a request., next_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., pagination_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., sort_order: str(recency/relevancy) # This order in which to return results., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{newest_id: str, next_token: str, oldest_id: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/tweets/search/recent
@desc Search recent Posts
@required {query: str # One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length.}
@optional {start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute)., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute)., since_id: str # Returns results with a Post ID greater than (that is, more recent than) the specified ID., until_id: str # Returns results with a Post ID less than (that is, older than) the specified ID., max_results: int(int32)=10 # The maximum number of search results to be returned by a request., next_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., pagination_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., sort_order: str(recency/relevancy) # This order in which to return results., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{newest_id: str, next_token: str, oldest_id: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/tweets/search/stream
@desc Stream filtered Posts
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, matching_rules: [map]} # The request has succeeded.

@endpoint GET /2/tweets/search/stream/rules
@desc Get stream rules
@optional {ids: [str] # A comma-separated list of Rule IDs., max_results: int(int32)=1000 # The maximum number of results., pagination_token: str # This value is populated by passing the 'next_token' returned in a request to paginate through results.}
@returns(200) {data: [map], meta: map{next_token: str, result_count: int(int32), sent: str, summary: any}} # The request has succeeded.

@endpoint POST /2/tweets/search/stream/rules
@desc Update stream rules
@optional {dry_run: bool # Dry Run can be used with both the add and delete action, with the expected result given, but without actually taking any action in the system (meaning the end state will always be as it was when the request was submitted). This is particularly useful to validate rule changes., delete_all: bool # Delete All can be used to delete all of the rules associated this client app, it should be specified with no other parameters. Once deleted, rules cannot be recovered.}
@returns(200) {data: [map], errors: [map], meta: map{next_token: str, result_count: int(int32), sent: str, summary: any}} # The request has succeeded.

@endpoint GET /2/tweets/search/stream/rules/counts
@desc Get stream rule counts
@optional {rules_count.fields: [str] # A comma separated list of RulesCount fields to display.}
@returns(200) {data: map{all_project_client_apps: [map], cap_per_client_app: int(int32), cap_per_project: int(int32), client_app_rules_count: map{client_app_id: str, rule_count: int(int32)}, project_rules_count: int(int32)}, errors: [map]} # The request has succeeded.

@endpoint GET /2/tweets/search/webhooks
@desc Get stream links
@returns(200) {data: map{links: [map]}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/tweets/search/webhooks/{webhook_id}
@desc Delete stream link
@required {webhook_id: str # The webhook ID to link to your FilteredStream ruleset.}
@returns(200) {data: map{deleted: bool}, errors: [map]} # The request has succeeded.

@endpoint POST /2/tweets/search/webhooks/{webhook_id}
@desc Create stream link
@required {webhook_id: str # The webhook ID to link to your FilteredStream ruleset.}
@optional {tweet.fields: str # A comma separated list of Tweet fields to display., expansions: str # A comma separated list of fields to expand., media.fields: str # A comma separated list of Media fields to display., poll.fields: str # A comma separated list of Poll fields to display., user.fields: str # A comma separated list of User fields to display., place.fields: str # A comma separated list of Place fields to display.}
@returns(200) {data: map{provisioned: bool}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/tweets/{id}
@desc Delete Post
@required {id: str # The ID of the Post to be deleted.}
@returns(200) {data: map{deleted: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/tweets/{id}
@desc Get Post by ID
@required {id: str # A single Post ID.}
@optional {tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: map{attachments: map{media_keys: [str], media_source_tweet_id: [str], poll_ids: [str]}, author_id: str, community_id: str, context_annotations: [map], conversation_id: str, created_at: str(date-time), display_text_range: [int], edit_controls: map{editable_until: str(date-time), edits_remaining: int, is_edit_eligible: bool}, edit_history_tweet_ids: [str], entities: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, geo: map{coordinates: map{coordinates: [num], type: str}, place_id: str}, id: str, in_reply_to_user_id: str, lang: str, non_public_metrics: map{impression_count: int(int32)}, note_tweet: map{entities: map{cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, text: str}, organic_metrics: map{impression_count: int, like_count: int, reply_count: int, retweet_count: int}, possibly_sensitive: bool, promoted_metrics: map{impression_count: int(int32), like_count: int(int32), reply_count: int(int32), retweet_count: int(int32)}, public_metrics: map{bookmark_count: int(int32), impression_count: int(int32), like_count: int, quote_count: int, reply_count: int, retweet_count: int}, referenced_tweets: [map], reply_settings: str, scopes: map{followers: bool}, source: str, suggested_source_links: [any], suggested_source_links_with_counts: map{count: int, url: any}, text: str, username: str, withheld: map{copyright: bool, country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/tweets/{id}/liking_users
@desc Get Liking Users
@required {id: str # A single Post ID.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/tweets/{id}/quote_tweets
@desc Get Quoted Posts
@required {id: str # A single Post ID.}
@optional {max_results: int(int32)=10 # The maximum number of results to be returned., pagination_token: str # This parameter is used to get a specified 'page' of results., exclude: [str] # The set of entities to exclude (e.g. 'replies' or 'retweets')., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/tweets/{id}/retweeted_by
@desc Get Reposted by
@required {id: str # A single Post ID.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/tweets/{id}/retweets
@desc Get Reposts
@required {id: str # A single Post ID.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint PUT /2/tweets/{tweet_id}/hidden
@desc Hide reply
@required {tweet_id: str # The ID of the reply that you want to hide or unhide., hidden: bool}
@returns(200) {data: map{hidden: bool}} # The request has succeeded.

@endpoint GET /2/usage/tweets
@desc Get usage
@optional {days: int(int32)=7 # The number of days for which you need usage for., usage.fields: [str] # A comma separated list of Usage fields to display.}
@returns(200) {data: map{cap_reset_day: int(int32), daily_client_app_usage: [map], daily_project_usage: map{project_id: int(int32), usage: [map]}, project_cap: int(int32), project_id: str(^[0-9]{1,19}$), project_usage: int(int32)}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users
@desc Get Users by IDs
@required {ids: [str] # A list of User IDs, comma-separated. You can specify up to 100 IDs.}
@optional {user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/users/by
@desc Get Users by usernames
@required {usernames: [str] # A list of usernames, comma-separated.}
@optional {user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/users/by/username/{username}
@desc Get User by username
@required {username: str # A username.}
@optional {user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: map{affiliation: map{badge_url: str(uri), description: str, url: str(uri), user_id: [str]}, connection_status: [str], created_at: str(date-time), description: str, entities: map{description: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, url: map{urls: [any]}}, id: str, location: str, most_recent_tweet_id: str, name: str, pinned_tweet_id: str, profile_banner_url: str(uri), profile_image_url: str(uri), protected: bool, public_metrics: map{followers_count: int, following_count: int, like_count: int, listed_count: int, tweet_count: int}, receives_your_dm: bool, subscription_type: str, url: str, username: str, verified: bool, verified_type: str, withheld: map{country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/users/compliance/stream
@desc Stream Users compliance data
@required {partition: int(int32) # The partition number.}
@optional {backfill_minutes: int(int32) # The number of minutes of backfill requested., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided.}
@returns(200) The request has succeeded.

@endpoint GET /2/users/me
@desc Get my User
@optional {user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: map{affiliation: map{badge_url: str(uri), description: str, url: str(uri), user_id: [str]}, connection_status: [str], created_at: str(date-time), description: str, entities: map{description: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, url: map{urls: [any]}}, id: str, location: str, most_recent_tweet_id: str, name: str, pinned_tweet_id: str, profile_banner_url: str(uri), profile_image_url: str(uri), protected: bool, public_metrics: map{followers_count: int, following_count: int, like_count: int, listed_count: int, tweet_count: int}, receives_your_dm: bool, subscription_type: str, url: str, username: str, verified: bool, verified_type: str, withheld: map{country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/users/personalized_trends
@desc Get personalized Trends
@optional {personalized_trend.fields: [str] # A comma separated list of PersonalizedTrend fields to display.}
@returns(200) {data: [map], errors: [map]} # The request has succeeded.

@endpoint GET /2/users/reposts_of_me
@desc Get Reposts of me
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/users/search
@desc Search Users
@required {query: str # TThe the query string by which to query for users.}
@optional {max_results: int(int32)=100 # The maximum number of results., next_token: str # This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str}} # The request has succeeded.

@endpoint GET /2/users/{id}
@desc Get User by ID
@required {id: str # The ID of the User to lookup.}
@optional {user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: map{affiliation: map{badge_url: str(uri), description: str, url: str(uri), user_id: [str]}, connection_status: [str], created_at: str(date-time), description: str, entities: map{description: map{annotations: [any], cashtags: [any], hashtags: [any], mentions: [any], urls: [any]}, url: map{urls: [any]}}, id: str, location: str, most_recent_tweet_id: str, name: str, pinned_tweet_id: str, profile_banner_url: str(uri), profile_image_url: str(uri), protected: bool, public_metrics: map{followers_count: int, following_count: int, like_count: int, listed_count: int, tweet_count: int}, receives_your_dm: bool, subscription_type: str, url: str, username: str, verified: bool, verified_type: str, withheld: map{country_codes: [str], scope: str}}, errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}} # The request has succeeded.

@endpoint GET /2/users/{id}/affiliates
@desc Get affiliates
@required {id: str # The ID of the User to lookup.}
@optional {max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/users/{id}/blocking
@desc Get blocking
@required {id: str # The ID of the authenticated source User for whom to return results.}
@optional {max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/users/{id}/bookmarks
@desc Get Bookmarks
@required {id: str # The ID of the authenticated source User for whom to return results.}
@optional {max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/users/{id}/bookmarks
@desc Create Bookmark
@required {id: str # The ID of the authenticated source User for whom to add bookmarks., tweet_id: str # Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.}
@returns(200) {data: map{bookmarked: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users/{id}/bookmarks/folders
@desc Get Bookmark folders
@required {id: str # The ID of the authenticated source User for whom to return results.}
@optional {max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results.}
@returns(200) {data: [map], errors: [map], meta: map{next_token: str}} # The request has succeeded.

@endpoint GET /2/users/{id}/bookmarks/folders/{folder_id}
@desc Get Bookmarks by folder ID
@required {id: str # The ID of the authenticated source User for whom to return results., folder_id: str # The ID of the Bookmark Folder that the authenticated User is trying to fetch Posts for.}
@returns(200) {data: [map], errors: [map], meta: map{next_token: str}} # The request has succeeded.

@endpoint DELETE /2/users/{id}/bookmarks/{tweet_id}
@desc Delete Bookmark
@required {id: str # The ID of the authenticated source User whose bookmark is to be removed., tweet_id: str # The ID of the Post that the source User is removing from bookmarks.}
@returns(200) {data: map{bookmarked: bool}, errors: [map]} # The request has succeeded.

@endpoint POST /2/users/{id}/dm/block
@desc Block DMs
@required {id: str # The ID of the target User that the authenticated user requesting to block dms for.}
@returns(200) {data: map{blocked: bool}, errors: [map]} # The request has succeeded.

@endpoint POST /2/users/{id}/dm/unblock
@desc Unblock DMs
@required {id: str # The ID of the target User that the authenticated user requesting to unblock dms for.}
@returns(200) {data: map{blocked: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users/{id}/followed_lists
@desc Get followed Lists
@required {id: str # The ID of the User to lookup.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., list.fields: [str] # A comma separated list of List fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/users/{id}/followed_lists
@desc Follow List
@required {id: str # The ID of the authenticated source User that will follow the List., list_id: str # The unique identifier of this List.}
@returns(200) {data: map{following: bool}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/users/{id}/followed_lists/{list_id}
@desc Unfollow List
@required {id: str # The ID of the authenticated source User that will unfollow the List., list_id: str # The ID of the List to unfollow.}
@returns(200) {data: map{following: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users/{id}/followers
@desc Get followers
@required {id: str # The ID of the User to lookup.}
@optional {max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/users/{id}/following
@desc Get following
@required {id: str # The ID of the User to lookup.}
@optional {max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/users/{id}/following
@desc Follow User
@required {id: str # The ID of the authenticated source User that is requesting to follow the target User., target_user_id: str # Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.}
@returns(200) {data: map{following: bool, pending_follow: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users/{id}/liked_tweets
@desc Get liked Posts
@required {id: str # The ID of the User to lookup.}
@optional {max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/users/{id}/likes
@desc Like Post
@required {id: str # The ID of the authenticated source User that is requesting to like the Post., tweet_id: str # Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.}
@returns(200) {data: map{liked: bool}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/users/{id}/likes/{tweet_id}
@desc Unlike Post
@required {id: str # The ID of the authenticated source User that is requesting to unlike the Post., tweet_id: str # The ID of the Post that the User is requesting to unlike.}
@returns(200) {data: map{liked: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users/{id}/list_memberships
@desc Get List memberships
@required {id: str # The ID of the User to lookup.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., list.fields: [str] # A comma separated list of List fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/users/{id}/mentions
@desc Get mentions
@required {id: str # The ID of the User to lookup.}
@optional {since_id: str # The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified., until_id: str # The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified., max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{newest_id: str, next_token: str, oldest_id: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/users/{id}/muting
@desc Get muting
@required {id: str # The ID of the authenticated source User for whom to return results.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., user.fields: [str] # A comma separated list of User fields to display., expansions: [str] # A comma separated list of fields to expand., tweet.fields: [str] # A comma separated list of Tweet fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/users/{id}/muting
@desc Mute User
@required {id: str # The ID of the authenticated source User that is requesting to mute the target User., target_user_id: str # Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.}
@returns(200) {data: map{muting: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users/{id}/owned_lists
@desc Get owned Lists
@required {id: str # The ID of the User to lookup.}
@optional {max_results: int(int32)=100 # The maximum number of results., pagination_token: str # This parameter is used to get a specified 'page' of results., list.fields: [str] # A comma separated list of List fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{next_token: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/users/{id}/pinned_lists
@desc Get pinned Lists
@required {id: str # The ID of the authenticated source User for whom to return results.}
@optional {list.fields: [str] # A comma separated list of List fields to display., expansions: [str] # A comma separated list of fields to expand., user.fields: [str] # A comma separated list of User fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/users/{id}/pinned_lists
@desc Pin List
@required {id: str # The ID of the authenticated source User that will pin the List., list_id: str # The unique identifier of this List.}
@returns(200) {data: map{pinned: bool}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/users/{id}/pinned_lists/{list_id}
@desc Unpin List
@required {id: str # The ID of the authenticated source User for whom to return results., list_id: str # The ID of the List to unpin.}
@returns(200) {data: map{pinned: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users/{id}/public_keys
@desc Get user public keys
@required {id: str # The ID of the User to lookup.}
@optional {public_key.fields: [str] # A comma separated list of PublicKey fields to display.}
@returns(200) {data: [map], errors: [map]} # The request has succeeded.

@endpoint POST /2/users/{id}/public_keys
@desc Add public key
@required {id: str # The ID of the requesting user., public_key: map{identity_public_key_signature: str, public_key: str, public_key_fingerprint: str, registration_method: str, signing_public_key: str, signing_public_key_signature: str} # Public key registration payload., version: str # Public key version.}
@optional {generate_version: bool # When true, the server generates a new version.}
@returns(200) {data: map{error_code: str, token_map: map{key_store_token_map_json: str, max_guess_count: int, realm_state_string: str, recover_threshold: int, register_threshold: int, token_map: [map]}, version: str}, errors: [map]} # The request has succeeded.

@endpoint POST /2/users/{id}/retweets
@desc Repost Post
@required {id: str # The ID of the authenticated source User that is requesting to repost the Post., tweet_id: str # Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.}
@returns(200) {data: map{id: str, retweeted: bool}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/users/{id}/retweets/{source_tweet_id}
@desc Unrepost Post
@required {id: str # The ID of the authenticated source User that is requesting to repost the Post., source_tweet_id: str # The ID of the Post that the User is requesting to unretweet.}
@returns(200) {data: map{retweeted: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/users/{id}/timelines/reverse_chronological
@desc Get Timeline
@required {id: str # The ID of the authenticated source User to list Reverse Chronological Timeline Posts of.}
@optional {since_id: str # The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified., until_id: str # The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified., max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., exclude: [str] # The set of entities to exclude (e.g. 'replies' or 'retweets')., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{newest_id: str, next_token: str, oldest_id: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint GET /2/users/{id}/tweets
@desc Get Posts
@required {id: str # The ID of the User to lookup.}
@optional {since_id: str # The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified., until_id: str # The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified., max_results: int(int32) # The maximum number of results., pagination_token: str # This parameter is used to get the next 'page' of results., exclude: [str] # The set of entities to exclude (e.g. 'replies' or 'retweets')., start_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified., end_time: str(date-time) # YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified., tweet.fields: [str] # A comma separated list of Tweet fields to display., expansions: [str] # A comma separated list of fields to expand., media.fields: [str] # A comma separated list of Media fields to display., poll.fields: [str] # A comma separated list of Poll fields to display., user.fields: [str] # A comma separated list of User fields to display., place.fields: [str] # A comma separated list of Place fields to display.}
@returns(200) {data: [map], errors: [map], includes: map{media: [map], places: [map], polls: [map], topics: [map], tweets: [map], users: [map]}, meta: map{newest_id: str, next_token: str, oldest_id: str, previous_token: str, result_count: int(int32)}} # The request has succeeded.

@endpoint DELETE /2/users/{source_user_id}/following/{target_user_id}
@desc Unfollow User
@required {source_user_id: str # The ID of the authenticated source User that is requesting to unfollow the target User., target_user_id: str # The ID of the User that the source User is requesting to unfollow.}
@returns(200) {data: map{following: bool}, errors: [map]} # The request has succeeded.

@endpoint DELETE /2/users/{source_user_id}/muting/{target_user_id}
@desc Unmute User
@required {source_user_id: str # The ID of the authenticated source User that is requesting to unmute the target User., target_user_id: str # The ID of the User that the source User is requesting to unmute.}
@returns(200) {data: map{muting: bool}, errors: [map]} # The request has succeeded.

@endpoint GET /2/webhooks
@desc Get webhook
@optional {webhook_config.fields: [str] # A comma separated list of WebhookConfig fields to display.}
@returns(200) {data: [map], errors: [map], meta: map{result_count: int(int32)}} # The request has succeeded.

@endpoint POST /2/webhooks
@desc Create webhook
@required {url: str}
@returns(200) {created_at: str(date-time), id: str, url: str, valid: bool} # The request has succeeded.

@endpoint POST /2/webhooks/replay
@desc Create replay job for webhook
@required {from_date: str # The oldest (starting) UTC timestamp (inclusive) from which events will be provided, in yyyymmddhhmm format., to_date: str # The oldest (starting) UTC timestamp (inclusive) from which events will be provided, in yyyymmddhhmm format., webhook_id: str # The unique identifier of this webhook config.}
@returns(200) {created_at: str(date-time), job_id: str} # The request has succeeded.

@endpoint DELETE /2/webhooks/{webhook_id}
@desc Delete webhook
@required {webhook_id: str # The ID of the webhook to delete.}
@returns(200) {data: map{deleted: bool}, errors: [map]} # The request has succeeded.

@endpoint PUT /2/webhooks/{webhook_id}
@desc Validate webhook
@required {webhook_id: str # The ID of the webhook to check.}
@returns(200) {data: map{attempted: bool}, errors: [map]} # The request has succeeded.

@end
