{ "openapi" : "3.0.0", "info" : { "description" : "X API v2 available endpoints", "version" : "2.166", "title" : "X API v2", "termsOfService" : "https://developer.x.com/en/developer-terms/agreement-and-policy.html", "contact" : { "name" : "X Developers", "url" : "https://developer.x.com/" }, "license" : { "name" : "X Developer Agreement and Policy", "url" : "https://developer.x.com/en/developer-terms/agreement-and-policy.html" } }, "paths" : { "/2/account_activity/subscriptions/count" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Account Activity" ], "summary" : "Get subscription count", "description" : "Retrieves a count of currently active Account Activity subscriptions.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, "operationId" : "getAccountActivitySubscriptionCount", "parameters" : [ ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionsCountGetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/account_activity/webhooks/{webhook_id}/subscriptions/all" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Account Activity" ], "summary" : "Validate subscription", "description" : "Checks a user’s Account Activity subscription for a given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, "operationId" : "validateAccountActivitySubscription", "parameters" : [ { "name" : "webhook_id", "in" : "path", "description" : "The webhook ID to check subscription against.", "required" : true, "schema" : { "$ref" : "#/components/schemas/WebhookConfigId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionsGetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Account Activity" ], "summary" : "Create subscription", "description" : "Creates an Account Activity subscription for the user and the given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, "operationId" : "createAccountActivitySubscription", "parameters" : [ { "name" : "webhook_id", "in" : "path", "description" : "The webhook ID to check subscription against.", "required" : true, "schema" : { "$ref" : "#/components/schemas/WebhookConfigId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionsCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionsCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/account_activity/webhooks/{webhook_id}/subscriptions/all/list" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Account Activity" ], "summary" : "Get subscriptions", "description" : "Retrieves a list of all active subscriptions for a given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, "operationId" : "getAccountActivitySubscriptions", "parameters" : [ { "name" : "webhook_id", "in" : "path", "description" : "The webhook ID to pull subscriptions for.", "required" : true, "schema" : { "$ref" : "#/components/schemas/WebhookConfigId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionsListGetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all" : { "delete" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Account Activity" ], "summary" : "Delete subscription", "description" : "Deletes an Account Activity subscription for the given webhook and user ID.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, "operationId" : "deleteAccountActivitySubscription", "parameters" : [ { "name" : "webhook_id", "in" : "path", "description" : "The webhook ID to check subscription against.", "required" : true, "schema" : { "$ref" : "#/components/schemas/WebhookConfigId" }, "style" : "simple" }, { "name" : "user_id", "in" : "path", "description" : "User ID to unsubscribe from.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionsDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/activity/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Activity", "Stream" ], "summary" : "Activity Stream", "description" : "Stream of X Activities", "externalDocs" : { "url" : "https://docs.x.com/x-api/activity/activity-stream" }, "operationId" : "activityStream", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActivityStreamingResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/activity/subscriptions" : { "delete" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Activity" ], "summary" : "Delete X activity subscriptions by IDs", "description" : "Deletes multiple subscriptions for X activity events by their IDs", "externalDocs" : { "url" : "https://docs.x.com/x-api/activity/delete-x-activity-subscriptions-by-ids" }, "operationId" : "deleteActivitySubscriptionsByIds", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "Comma-separated list of subscription IDs to delete.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "$ref" : "#/components/schemas/ActivitySubscriptionId" } }, "explode" : false, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Activity" ], "summary" : "Get X activity subscriptions", "description" : "Get a list of active subscriptions for XAA", "externalDocs" : { "url" : "https://docs.x.com/x-api/activity/get-x-activity-subscriptions" }, "operationId" : "getActivitySubscriptions", "parameters" : [ { "name" : "max_results", "in" : "query", "description" : "The maximum number of results to return per page. Defaults to 1000 when unspecified; use pagination_token (from response meta.next_token) to fetch additional pages.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 1000, "format" : "int32", "default" : 1000 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken32" }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionGetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "dm.read", "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Activity", "Stream" ], "summary" : "Create X activity subscription", "description" : "Creates a subscription for an X activity event", "externalDocs" : { "url" : "https://docs.x.com/x-api/activity/create-x-activity-subscription" }, "operationId" : "createActivitySubscription", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/activity/subscriptions/{subscription_id}" : { "delete" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Activity" ], "summary" : "Deletes X activity subscription", "description" : "Deletes a subscription for an X activity event", "externalDocs" : { "url" : "https://docs.x.com/x-api/activity/deletes-x-activity-subscription" }, "operationId" : "deleteActivitySubscription", "parameters" : [ { "name" : "subscription_id", "in" : "path", "description" : "The ID of the subscription to delete.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "put" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Activity" ], "summary" : "Update X activity subscription", "description" : "Updates a subscription for an X activity event", "externalDocs" : { "url" : "https://docs.x.com/x-api/activity/update-x-activity-subscription" }, "operationId" : "updateActivitySubscription", "parameters" : [ { "name" : "subscription_id", "in" : "path", "description" : "The ID of the subscription to update.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionUpdateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActivitySubscriptionUpdateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/articles/draft" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "tweet.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Articles" ], "summary" : "Create draft Article", "description" : "Creates a new Article draft that can later be published.", "operationId" : "articleCreateDraft", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ArticleDraftCreateRequest" } } }, "required" : true }, "responses" : { "201" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ArticleDraftCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/articles/{article_id}/publish" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "tweet.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Articles" ], "summary" : "Publish Article", "description" : "Publishes a draft Article, making it publicly visible.", "operationId" : "articlePublish", "parameters" : [ { "name" : "article_id", "in" : "path", "description" : "The ID of the draft article to publish.", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ArticlePublishResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Get Chat Conversations", "description" : "Retrieves a list of Chat conversations for the authenticated user's inbox.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "getChatConversations", "parameters" : [ { "name" : "max_results", "in" : "query", "description" : "Maximum number of conversations to return.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "Token for pagination to retrieve the next page of results.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "$ref" : "#/components/parameters/ChatConversationFieldsParameter" }, { "$ref" : "#/components/parameters/ChatConversationExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatGetConversationsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/group" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Create Chat Group Conversation", "description" : "Creates a new encrypted Chat group conversation on behalf of the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "createChatConversation", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatCreateConversationRequest" } } }, "required" : true }, "responses" : { "201" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatCreateConversationResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/group/initialize" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Initialize Chat Group", "description" : "Initializes a new XChat group conversation and returns a unique conversation ID.\n\nThis endpoint is the first step in creating a group chat. The returned conversation_id \nshould be used in subsequent calls to POST /chat/conversations/group to fully create and \nconfigure the group with members, admins, encryption keys, and other settings.\n\n**Workflow:**\n1. Call this endpoint to get a `conversation_id`\n2. Use that `conversation_id` when calling `POST /chat/conversations/group` to create the group\n\n**Authentication:**\n- Requires OAuth 1.0a User Context or OAuth 2.0 User Context\n- Required scope: `dm.write`\n", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "initializeChatGroup", "parameters" : [ ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatInitializeGroupResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/{id}" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Get Chat Conversation", "description" : "Returns metadata for a Chat conversation including type, muted status, and group details. Use chat_conversation.fields to select which fields are returned. Use expansions to hydrate member, admin, or participant user objects. Use user.fields to control which profile fields are returned for expanded users.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "getChatConversation", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The conversation ID. For 1:1 conversations, use the recipient user ID or dash-separated canonical ID. For group conversations, use the group ID (prefixed with 'g').", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" }, { "$ref" : "#/components/parameters/ChatConversationFieldsParameter" }, { "$ref" : "#/components/parameters/ChatConversationExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatGetConversationsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/{id}/events" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Get Chat Conversation Events", "description" : "Retrieves messages and key change events for a specific Chat conversation with pagination support. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "getChatConversationEvents", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').", "required" : true, "schema" : { "$ref" : "#/components/schemas/ChatConversationOrRecipientId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "Maximum number of message events to return.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "Token for pagination to retrieve the next page of results.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "$ref" : "#/components/parameters/ChatMessageEventFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatGetConversationResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/{id}/keys" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Initialize Conversation Keys", "description" : "Initializes encryption keys for a Chat conversation. This is the first step\nbefore sending messages in a new 1:1 conversation.\n\nFor 1:1 conversations, provide the recipient's user ID as the conversation_id.\nThe server constructs the canonical conversation ID from the authenticated user\nand recipient.\n\nThe request body must contain the conversation key version and participant keys\n(the conversation key encrypted for each participant using their public key).\n\n**Workflow (1:1 conversation):**\n1. Generate a conversation key using the SDK\n2. Encrypt the key for both participants using their public keys\n3. Call this endpoint to register the keys\n4. Send messages using `POST /chat/conversations/{id}/messages`\n\n**Authentication:**\n- Requires OAuth 1.0a User Context or OAuth 2.0 User Context\n- Required scopes: `tweet.read`, `users.read`, `dm.write`\n", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "initializeChatConversationKeys", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').", "required" : true, "schema" : { "$ref" : "#/components/schemas/ChatConversationOrRecipientId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatInitializeConversationKeysRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatInitializeConversationKeysResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/{id}/members" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Add members to a Chat group conversation", "description" : "Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "addChatGroupMembers", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The Chat group conversation ID.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ChatConversationOrRecipientId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatAddGroupMembersRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatAddGroupMembersResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/{id}/messages" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Send Chat Message", "description" : "Sends an encrypted message to a specific Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "sendChatMessage", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').", "required" : true, "schema" : { "$ref" : "#/components/schemas/ChatConversationOrRecipientId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatSendMessageRequest" } } }, "required" : true }, "responses" : { "201" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatSendMessageResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/{id}/read" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Mark Conversation as Read", "description" : "Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "markChatConversationRead", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').", "required" : true, "schema" : { "$ref" : "#/components/schemas/ChatConversationOrRecipientId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatMarkConversationReadRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatMarkConversationReadResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/conversations/{id}/typing" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Send Typing Indicator", "description" : "Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "sendChatTypingIndicator", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').", "required" : true, "schema" : { "$ref" : "#/components/schemas/ChatConversationOrRecipientId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatSendTypingIndicatorResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/media/upload/initialize" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Initialize Chat Media Upload", "description" : "Initializes an XChat media upload session.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, "operationId" : "chatMediaUploadInitialize", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatMediaUploadInitializeRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatMediaUploadInitializeResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/media/upload/{id}/append" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Append Chat Media Upload", "description" : "Appends media data to an XChat upload session.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, "operationId" : "chatMediaUploadAppend", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The session/resume id from initialize.", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatMediaUploadAppendRequest" } }, "multipart/form-data" : { "schema" : { "$ref" : "#/components/schemas/ChatMediaUploadAppendRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadAppendResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/media/upload/{id}/finalize" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Finalize Chat Media Upload", "description" : "Finalizes an XChat media upload session.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, "operationId" : "chatMediaUploadFinalize", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The session/resume id from initialize.", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatMediaUploadFinalizeRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatMediaUploadFinalizeResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/chat/media/{id}/{media_hash_key}" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Download Chat Media", "description" : "Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "chatMediaDownload", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').", "required" : true, "schema" : { "$ref" : "#/components/schemas/ChatConversationOrRecipientId" }, "style" : "simple" }, { "name" : "media_hash_key", "in" : "path", "description" : "The media hash key returned from the upload initialize step.", "required" : true, "schema" : { "$ref" : "#/components/schemas/MediaHashKey" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/octet-stream" : { "schema" : { "$ref" : "#/components/schemas/BinaryPayload" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/communities/search" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Communities" ], "summary" : "Search Communities", "description" : "Retrieves a list of Communities matching the specified search query.", "externalDocs" : { "url" : "https://developer.x.com" }, "operationId" : "searchCommunities", "parameters" : [ { "name" : "query", "in" : "query", "description" : "Query to search communities.", "required" : true, "schema" : { "type" : "string", "minLength" : 1, "maxLength" : 4096, "example" : "Love" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of search results to be returned by a request.", "required" : false, "schema" : { "type" : "integer", "minimum" : 10, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "next_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/NextToken" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/NextToken" }, "style" : "form" }, { "$ref" : "#/components/parameters/CommunityFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2CommunitiesSearchResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/communities/{id}" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Communities" ], "summary" : "Get Community by ID", "description" : "Retrieves details of a specific Community by its ID.", "externalDocs" : { "url" : "https://developer.x.com/en/docs/x-api/communities/api-reference/get-communities-id" }, "operationId" : "getCommunitiesById", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the Community.", "required" : true, "schema" : { "$ref" : "#/components/schemas/CommunityId" }, "style" : "simple" }, { "$ref" : "#/components/parameters/CommunityFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2CommunitiesIdResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/compliance/jobs" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Compliance" ], "summary" : "Get Compliance Jobs", "description" : "Retrieves a list of Compliance Jobs filtered by job type and optional status.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/compliance/batch-compliance/api-reference/get-compliance-jobs" }, "operationId" : "getComplianceJobs", "parameters" : [ { "name" : "type", "in" : "query", "description" : "Type of Compliance Job to list.", "required" : true, "schema" : { "type" : "string", "enum" : [ "tweets", "users" ] }, "style" : "form" }, { "name" : "status", "in" : "query", "description" : "Status of Compliance Job to list.", "required" : false, "schema" : { "type" : "string", "enum" : [ "created", "in_progress", "failed", "complete" ] }, "style" : "form" }, { "$ref" : "#/components/parameters/ComplianceJobFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2ComplianceJobsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Compliance" ], "summary" : "Create Compliance Job", "description" : "Creates a new Compliance Job for the specified job type.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/compliance/batch-compliance/api-reference/post-compliance-jobs" }, "operationId" : "createComplianceJobs", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateComplianceJobRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateComplianceJobResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/compliance/jobs/{id}" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Compliance" ], "summary" : "Get Compliance Job by ID", "description" : "Retrieves details of a specific Compliance Job by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/compliance/batch-compliance/api-reference/get-compliance-jobs-id" }, "operationId" : "getComplianceJobsById", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the Compliance Job to retrieve.", "required" : true, "schema" : { "$ref" : "#/components/schemas/JobId" }, "style" : "simple" }, { "$ref" : "#/components/parameters/ComplianceJobFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2ComplianceJobsIdResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/connections" : { "delete" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Connections" ], "summary" : "Terminate multiple connections", "description" : "Terminates multiple streaming connections by their UUIDs for the authenticated application.", "operationId" : "deleteConnectionsByUuids", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/KillConnectionsByUuidsRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/KillConnectionsByUuidsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Connections" ], "summary" : "Get Connection History", "description" : "Returns active and historical streaming connections with disconnect reasons for the authenticated application.", "operationId" : "getConnectionHistory", "parameters" : [ { "name" : "status", "in" : "query", "description" : "Filter by connection status. Use 'active' for current connections, 'inactive' for historical/disconnected connections, or 'all' for both.", "required" : false, "schema" : { "type" : "string", "enum" : [ "active", "inactive", "all" ], "default" : "active" }, "style" : "form" }, { "name" : "endpoints", "in" : "query", "description" : "Filter by streaming endpoint. Specify one or more endpoint names to filter results.", "required" : false, "schema" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "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" ] } }, "explode" : false, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results to return per page.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "Token for paginating through results. Use the value from 'next_token' in the previous response.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "$ref" : "#/components/parameters/ConnectionFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2ConnectionsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/connections/all" : { "delete" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Connections" ], "summary" : "Terminate all connections", "description" : "Terminates all active streaming connections for the authenticated application.", "externalDocs" : { "url" : "https://docs.x.com/x-api/connections/terminate-all-connections" }, "operationId" : "deleteAllConnections", "parameters" : [ ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/KillAllConnectionsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/connections/{endpoint_id}" : { "delete" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Connections" ], "summary" : "Terminate connections by endpoint", "description" : "Terminates all streaming connections for a specific endpoint ID for the authenticated application.", "operationId" : "deleteConnectionsByEndpoint", "parameters" : [ { "name" : "endpoint_id", "in" : "path", "description" : "The endpoint ID to terminate connections for.", "required" : true, "schema" : { "type" : "string", "enum" : [ "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" ] }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/KillConnectionsByEndpointResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/dm_conversations" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Direct Messages" ], "summary" : "Create DM conversation", "description" : "Initiates a new direct message conversation with specified participants.", "operationId" : "createDirectMessagesConversation", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateDmConversationRequest" } } } }, "responses" : { "201" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateDmEventResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read" ] } ], "tags" : [ "Direct Messages" ], "summary" : "Download DM Media", "description" : "Downloads media attached to a legacy Direct Message. The requesting user must be a participant in the conversation containing the specified DM event. The response body contains raw binary bytes.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "dmConversationsMediaDownload", "parameters" : [ { "name" : "dm_id", "in" : "path", "description" : "The unique identifier of the Direct Message event containing the media.", "required" : true, "schema" : { "$ref" : "#/components/schemas/DmEventId" }, "style" : "simple" }, { "name" : "media_id", "in" : "path", "description" : "The unique identifier of the media attached to the Direct Message.", "required" : true, "schema" : { "$ref" : "#/components/schemas/MediaId" }, "style" : "simple" }, { "name" : "resource_id", "in" : "path", "description" : "The resource identifier of the media file, including file extension (e.g. 'hVJQTwig.jpg').", "required" : true, "schema" : { "$ref" : "#/components/schemas/DmResourceId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/octet-stream" : { "schema" : { "$ref" : "#/components/schemas/BinaryPayload" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/dm_conversations/with/{participant_id}/dm_events" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Direct Messages" ], "summary" : "Get DM events for a DM conversation", "description" : "Retrieves direct message events for a specific conversation.", "operationId" : "getDirectMessagesEventsByParticipantId", "parameters" : [ { "name" : "participant_id", "in" : "path", "description" : "The ID of the participant user for the One to One DM conversation.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken32" }, "style" : "form" }, { "name" : "event_types", "in" : "query", "description" : "The set of event_types to include in the results.", "required" : false, "schema" : { "type" : "array", "minItems" : 1, "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "MessageCreate", "ParticipantsJoin", "ParticipantsLeave" ] }, "default" : [ "MessageCreate", "ParticipantsLeave", "ParticipantsJoin" ], "example" : [ "MessageCreate", "ParticipantsLeave" ] }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/DmEventFieldsParameter" }, { "$ref" : "#/components/parameters/DmEventExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2DmConversationsWithParticipantIdDmEventsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/dm_conversations/with/{participant_id}/messages" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Direct Messages" ], "summary" : "Create DM message by participant ID", "description" : "Sends a new direct message to a specific participant by their ID.", "operationId" : "createDirectMessagesByParticipantId", "parameters" : [ { "name" : "participant_id", "in" : "path", "description" : "The ID of the recipient user that will receive the DM.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateMessageRequest" } } } }, "responses" : { "201" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateDmEventResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/dm_conversations/{dm_conversation_id}/messages" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Direct Messages" ], "summary" : "Create DM message by conversation ID", "description" : "Sends a new direct message to a specific conversation by its ID.", "operationId" : "createDirectMessagesByConversationId", "parameters" : [ { "name" : "dm_conversation_id", "in" : "path", "description" : "The DM Conversation ID.", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateMessageRequest" } } } }, "responses" : { "201" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateDmEventResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/dm_conversations/{id}/dm_events" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Direct Messages" ], "summary" : "Get DM events for a DM conversation", "description" : "Retrieves direct message events for a specific conversation.", "operationId" : "getDirectMessagesEventsByConversationId", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The DM conversation ID.", "required" : true, "schema" : { "$ref" : "#/components/schemas/DmConversationId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken32" }, "style" : "form" }, { "name" : "event_types", "in" : "query", "description" : "The set of event_types to include in the results.", "required" : false, "schema" : { "type" : "array", "minItems" : 1, "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "MessageCreate", "ParticipantsJoin", "ParticipantsLeave" ] }, "default" : [ "MessageCreate", "ParticipantsLeave", "ParticipantsJoin" ], "example" : [ "MessageCreate", "ParticipantsLeave" ] }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/DmEventFieldsParameter" }, { "$ref" : "#/components/parameters/DmEventExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2DmConversationsIdDmEventsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/dm_events" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Direct Messages" ], "summary" : "Get DM events", "description" : "Retrieves a list of recent direct message events across all conversations.", "operationId" : "getDirectMessagesEvents", "parameters" : [ { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken32" }, "style" : "form" }, { "name" : "event_types", "in" : "query", "description" : "The set of event_types to include in the results.", "required" : false, "schema" : { "type" : "array", "minItems" : 1, "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "MessageCreate", "ParticipantsJoin", "ParticipantsLeave" ] }, "default" : [ "MessageCreate", "ParticipantsLeave", "ParticipantsJoin" ], "example" : [ "MessageCreate", "ParticipantsLeave" ] }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/DmEventFieldsParameter" }, { "$ref" : "#/components/parameters/DmEventExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2DmEventsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/dm_events/{event_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "dm.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Direct Messages" ], "summary" : "Delete DM event", "description" : "Deletes a specific direct message event by its ID, if owned by the authenticated user.", "operationId" : "deleteDirectMessagesEvents", "parameters" : [ { "name" : "event_id", "in" : "path", "description" : "The ID of the direct-message event to delete.", "required" : true, "schema" : { "$ref" : "#/components/schemas/DmEventId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DeleteDmResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Direct Messages" ], "summary" : "Get DM event by ID", "description" : "Retrieves details of a specific direct message event by its ID.", "operationId" : "getDirectMessagesEventsById", "parameters" : [ { "name" : "event_id", "in" : "path", "description" : "dm event id.", "required" : true, "schema" : { "$ref" : "#/components/schemas/DmEventId" }, "style" : "simple" }, { "$ref" : "#/components/parameters/DmEventFieldsParameter" }, { "$ref" : "#/components/parameters/DmEventExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2DmEventsEventIdResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/evaluate_note" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "tweet.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Community Notes" ], "summary" : "Evaluate a Community Note", "description" : "Endpoint to evaluate a community note.", "externalDocs" : { "url" : "https://communitynotes.x.com/guide/api/overview" }, "operationId" : "evaluateCommunityNotes", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/EvaluateNoteRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/EvaluateNoteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/insights/28hr" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get 28-hour Post insights", "description" : "Retrieves engagement metrics for specified Posts over the last 28 hours.", "operationId" : "getInsights28Hr", "parameters" : [ { "name" : "tweet_ids", "in" : "query", "description" : "List of PostIds for 28hr metrics.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 25, "uniqueItems" : true, "items" : { "$ref" : "#/components/schemas/TweetId" }, "example" : [ "20" ] }, "style" : "form" }, { "name" : "granularity", "in" : "query", "description" : "granularity of metrics response.", "required" : true, "schema" : { "type" : "string", "enum" : [ "Daily", "Hourly", "Weekly", "Total" ], "example" : "Total" }, "style" : "form" }, { "name" : "requested_metrics", "in" : "query", "description" : "request metrics for historical request.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "AppInstallAttempts", "AppOpens", "DetailExpands", "EmailTweet", "Engagements", "Follows", "HashtagClicks", "Impressions", "Likes", "LinkClicks", "MediaEngagements", "MediaViews", "PermalinkClicks", "ProfileVisits", "QuoteTweets", "Replies", "Retweets", "UniqueVideoViews", "UrlClicks", "UserProfileClicks", "VideoCompletions", "VideoPlayed25Percent", "VideoPlayed50Percent", "VideoPlayed75Percent", "VideoStarts", "VideoViews" ] } }, "style" : "form" }, { "$ref" : "#/components/parameters/EngagementFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2Insights28hrResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/insights/historical" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get historical Post insights", "description" : "Retrieves historical engagement metrics for specified Posts within a defined time range.", "operationId" : "getInsightsHistorical", "parameters" : [ { "name" : "tweet_ids", "in" : "query", "description" : "List of PostIds for historical metrics.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 25, "uniqueItems" : true, "items" : { "$ref" : "#/components/schemas/TweetId" }, "example" : [ "20" ] }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range.", "required" : true, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range.", "required" : true, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "granularity", "in" : "query", "description" : "granularity of metrics response.", "required" : true, "schema" : { "type" : "string", "enum" : [ "Daily", "Hourly", "Weekly", "Total" ], "example" : "Total" }, "style" : "form" }, { "name" : "requested_metrics", "in" : "query", "description" : "request metrics for historical request.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "AppInstallAttempts", "AppOpens", "DetailExpands", "EmailTweet", "Engagements", "Follows", "HashtagClicks", "Impressions", "Likes", "LinkClicks", "MediaEngagements", "MediaViews", "PermalinkClicks", "ProfileVisits", "QuoteTweets", "Replies", "Retweets", "UniqueVideoViews", "UrlClicks", "UserProfileClicks", "VideoCompletions", "VideoPlayed25Percent", "VideoPlayed50Percent", "VideoPlayed75Percent", "VideoStarts", "VideoViews" ] } }, "style" : "form" }, { "$ref" : "#/components/parameters/EngagementFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2InsightsHistoricalResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/likes/compliance/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Compliance" ], "summary" : "Stream Likes compliance data", "description" : "Streams all compliance data related to Likes for Users.", "operationId" : "streamLikesCompliance", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/LikesComplianceStreamResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/likes/firehose/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Likes" ], "summary" : "Stream all Likes", "description" : "Streams all public Likes in real-time.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-likes-firehose-stream" }, "operationId" : "streamLikesFirehose", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 20, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/LikeWithTweetAuthorFieldsParameter" }, { "$ref" : "#/components/parameters/LikeWithTweetAuthorExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/StreamingLikeResponseV2" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/likes/sample10/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Likes" ], "summary" : "Stream sampled Likes", "description" : "Streams a 10% sample of public Likes in real-time.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/likes/firehose/api-reference/get-likes-sample10-stream" }, "operationId" : "streamLikesSample10", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 2, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/LikeWithTweetAuthorFieldsParameter" }, { "$ref" : "#/components/parameters/LikeWithTweetAuthorExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/StreamingLikeResponseV2" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/lists" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "list.read", "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists" ], "summary" : "Create List", "description" : "Creates a new List for the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/post-lists" }, "operationId" : "createLists", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/lists/{id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists" ], "summary" : "Delete List", "description" : "Deletes a specific List owned by the authenticated user by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/delete-lists-id" }, "operationId" : "deleteLists", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the List to delete.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists" ], "summary" : "Get List by ID", "description" : "Retrieves details of a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-lookup/api-reference/get-lists-id" }, "operationId" : "getListsById", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the List.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" }, { "$ref" : "#/components/parameters/ListFieldsParameter" }, { "$ref" : "#/components/parameters/ListExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2ListsIdResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "put" : { "security" : [ { "OAuth2UserToken" : [ "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists" ], "summary" : "Update List", "description" : "Updates the details of a specific List owned by the authenticated user by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/put-lists-id" }, "operationId" : "updateLists", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the List to modify.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListUpdateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListUpdateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/lists/{id}/followers" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists", "Users" ], "summary" : "Get List followers", "description" : "Retrieves a list of Users who follow a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/get-users-id-followers" }, "operationId" : "getListsFollowers", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the List.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationTokenLong" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2ListsIdFollowersResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/lists/{id}/members" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists", "Users" ], "summary" : "Get List members", "description" : "Retrieves a list of Users who are members of a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/get-users-id-list_memberships" }, "operationId" : "getListsMembers", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the List.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationTokenLong" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2ListsIdMembersResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists" ], "summary" : "Add List member", "description" : "Adds a User to a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/post-lists-id-members" }, "operationId" : "addListsMember", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the List for which to add a member.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListAddUserRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListMutateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/lists/{id}/members/{user_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists" ], "summary" : "Remove List member", "description" : "Removes a User from a specific List by its ID and the User’s ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/delete-lists-id-members-user_id" }, "operationId" : "removeListsMemberByUserId", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the List to remove a member.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" }, { "name" : "user_id", "in" : "path", "description" : "The ID of User that will be removed from the List.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListMutateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/lists/{id}/tweets" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Lists", "Tweets" ], "summary" : "Get List Posts", "description" : "Retrieves a list of Posts associated with a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-tweets/api-reference/get-lists-id-tweets" }, "operationId" : "getListsPosts", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the List.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2ListsIdTweetsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Get Media by media keys", "description" : "Retrieves details of Media files by their media keys.", "externalDocs" : { "url" : "https://developer.x.com" }, "operationId" : "getMediaByMediaKeys", "parameters" : [ { "name" : "media_keys", "in" : "query", "description" : "A comma separated list of Media Keys. Up to 100 are allowed in a single request.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "$ref" : "#/components/schemas/MediaKey" } }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2MediaResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media/analytics" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Get Media analytics", "description" : "Retrieves analytics data for media.", "operationId" : "getMediaAnalytics", "parameters" : [ { "name" : "media_keys", "in" : "query", "description" : "A comma separated list of Media Keys. Up to 100 are allowed in a single request.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "$ref" : "#/components/schemas/MediaKey" } }, "explode" : false, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range.", "required" : true, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range.", "required" : true, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "granularity", "in" : "query", "description" : "The granularity for the search counts results.", "required" : true, "schema" : { "type" : "string", "enum" : [ "hourly", "daily", "total" ], "default" : "daily" }, "style" : "form" }, { "$ref" : "#/components/parameters/MediaAnalyticsFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaAnalytics" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media/metadata" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Create Media metadata", "description" : "Creates metadata for a Media file.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-metadata-create#metadata-create" }, "operationId" : "createMediaMetadata", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MetadataCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MetadataCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media/subtitles" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Delete Media subtitles", "description" : "Deletes subtitles for a specific Media file.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-subtitles-delete" }, "operationId" : "deleteMediaSubtitles", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubtitlesDeleteRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubtitlesDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Create Media subtitles", "description" : "Creates subtitles for a specific Media file.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-subtitles-create" }, "operationId" : "createMediaSubtitles", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubtitlesCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubtitlesCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media/upload" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Get Media upload status", "description" : "Retrieves the status of a Media upload by its ID.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload-status#media-upload-status" }, "operationId" : "getMediaUploadStatus", "parameters" : [ { "name" : "media_id", "in" : "query", "description" : "Media id for the requested media upload status.", "required" : true, "schema" : { "$ref" : "#/components/schemas/MediaId" }, "style" : "form" }, { "name" : "command", "in" : "query", "description" : "The command for the media upload request.", "required" : false, "schema" : { "type" : "string", "enum" : [ "STATUS" ] }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Upload media", "description" : "Uploads a media file for use in posts or other content.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, "operationId" : "mediaUpload", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadRequestOneShot" } }, "multipart/form-data" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadRequestOneShot" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media/upload/initialize" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Initialize media upload", "description" : "Initializes a media upload.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, "operationId" : "initializeMediaUpload", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadConfigRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media/upload/{id}/append" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Append Media upload", "description" : "Appends data to a Media upload request.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, "operationId" : "appendMediaUpload", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The media identifier for the media to perform the append operation.", "required" : true, "schema" : { "$ref" : "#/components/schemas/MediaId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadAppendRequest" } }, "multipart/form-data" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadAppendRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadAppendResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media/upload/{id}/finalize" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "media.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Finalize Media upload", "description" : "Finalizes a Media upload request.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, "operationId" : "finalizeMediaUpload", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The media id of the targeted media to finalize.", "required" : true, "schema" : { "$ref" : "#/components/schemas/MediaId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MediaUploadResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/media/{media_key}" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Media" ], "summary" : "Get Media by media key", "description" : "Retrieves details of a specific Media file by its media key.", "externalDocs" : { "url" : "https://developer.x.com" }, "operationId" : "getMediaByMediaKey", "parameters" : [ { "name" : "media_key", "in" : "path", "description" : "A single Media Key.", "required" : true, "schema" : { "$ref" : "#/components/schemas/MediaKey" }, "style" : "simple" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2MediaMediaKeyResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/news/search" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] } ], "tags" : [ "News" ], "summary" : "Search News", "description" : "Retrieves a list of News stories matching the specified search query.", "externalDocs" : { "url" : "https://docs.x.com/x-api/news/introduction" }, "operationId" : "searchNews", "parameters" : [ { "name" : "query", "in" : "query", "description" : "The search query.", "required" : true, "example" : "crypto", "schema" : { "type" : "string", "minLength" : 1, "maxLength" : 2048, "example" : "crypto" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The number of results to return.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "max_age_hours", "in" : "query", "description" : "The maximum age of the News story to search for.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 720, "format" : "int32", "default" : 168 }, "style" : "form" }, { "$ref" : "#/components/parameters/NewsFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2NewsSearchResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/news/{id}" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "News" ], "summary" : "Get news stories by ID", "description" : "Retrieves news story by its ID.", "externalDocs" : { "url" : "https://docs.x.com/x-api/news/introduction" }, "operationId" : "getNews", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the news story.", "required" : true, "example" : "119929381293", "schema" : { "$ref" : "#/components/schemas/NewsId" }, "style" : "simple" }, { "$ref" : "#/components/parameters/NewsFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2NewsIdResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/notes" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "tweet.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Community Notes" ], "summary" : "Create a Community Note", "description" : "Creates a community note endpoint for LLM use case.", "externalDocs" : { "url" : "https://communitynotes.x.com/guide/api/overview" }, "operationId" : "createCommunityNotes", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateNoteRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreateNoteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/notes/search/notes_written" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Community Notes" ], "summary" : "Search for Community Notes Written", "description" : "Returns all the community notes written by the user.", "externalDocs" : { "url" : "https://docs.x.com/x-api/community-notes/search-for-community-notes-written" }, "operationId" : "searchCommunityNotesWritten", "parameters" : [ { "name" : "test_mode", "in" : "query", "description" : "If true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product.", "required" : true, "schema" : { "type" : "boolean" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "Pagination token to get next set of posts eligible for notes.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "Max results to return.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "$ref" : "#/components/parameters/NoteFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2NotesSearchNotesWrittenResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/notes/search/posts_eligible_for_notes" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Community Notes" ], "summary" : "Search for Posts Eligible for Community Notes", "description" : "Returns all the posts that are eligible for community notes.", "externalDocs" : { "url" : "https://docs.x.com/x-api/community-notes/search-for-posts-eligible-for-community-notes" }, "operationId" : "searchEligiblePosts", "parameters" : [ { "name" : "test_mode", "in" : "query", "description" : "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.", "required" : true, "schema" : { "type" : "boolean" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "Pagination token to get next set of posts eligible for notes.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "Max results to return.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "post_selection", "in" : "query", "description" : "The selection of posts to return. Valid values are 'feed_size: [small|large|xl|xxl], feed_lang: [en|es|...|all]'. Default (if not specified) is 'feed_size: small, feed_lang: en'. Only top AI writers have access to large, xl, and xxl size feeds.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2NotesSearchPostsEligibleForNotesResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/notes/{id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "tweet.write" ] }, { "UserToken" : [ ] } ], "tags" : [ "Community Notes" ], "summary" : "Delete a Community Note", "description" : "Deletes a community note.", "externalDocs" : { "url" : "https://communitynotes.x.com/guide/api/overview" }, "operationId" : "deleteCommunityNotes", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The community note id to delete.", "required" : true, "schema" : { "$ref" : "#/components/schemas/NoteId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DeleteNoteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/openapi.json" : { "get" : { "tags" : [ "General" ], "summary" : "Get OpenAPI Spec.", "description" : "Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md)", "operationId" : "getOpenApiSpec", "parameters" : [ ], "responses" : { "200" : { "description" : "The request was successful", "content" : { "application/json" : { "schema" : { "type" : "object" } } } } } } }, "/2/spaces" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "space.read", "tweet.read", "users.read" ] } ], "tags" : [ "Spaces" ], "summary" : "Get Spaces by IDs", "description" : "Retrieves details of multiple Spaces by their IDs.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces" }, "operationId" : "getSpacesByIds", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "The list of Space IDs to return.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "type" : "string", "description" : "The unique identifier of this Space.", "pattern" : "^[a-zA-Z0-9]{1,13}$", "example" : "1SLjjRYNejbKM" } }, "style" : "form" }, { "$ref" : "#/components/parameters/SpaceFieldsParameter" }, { "$ref" : "#/components/parameters/SpaceExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TopicFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2SpacesResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/spaces/by/creator_ids" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "space.read", "tweet.read", "users.read" ] } ], "tags" : [ "Spaces" ], "summary" : "Get Spaces by creator IDs", "description" : "Retrieves details of Spaces created by specified User IDs.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces-by-creator-ids" }, "operationId" : "getSpacesByCreatorIds", "parameters" : [ { "name" : "user_ids", "in" : "query", "description" : "The IDs of Users to search through.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "$ref" : "#/components/schemas/UserId" } }, "style" : "form" }, { "$ref" : "#/components/parameters/SpaceFieldsParameter" }, { "$ref" : "#/components/parameters/SpaceExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TopicFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2SpacesByCreatorIdsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/spaces/search" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "space.read", "tweet.read", "users.read" ] } ], "tags" : [ "Spaces" ], "summary" : "Search Spaces", "description" : "Retrieves a list of Spaces matching the specified search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/search/api-reference/get-spaces-search" }, "operationId" : "searchSpaces", "parameters" : [ { "name" : "query", "in" : "query", "description" : "The search query.", "required" : true, "example" : "crypto", "schema" : { "type" : "string", "minLength" : 1, "maxLength" : 2048, "example" : "crypto" }, "style" : "form" }, { "name" : "state", "in" : "query", "description" : "The state of Spaces to search for.", "required" : false, "schema" : { "type" : "string", "enum" : [ "live", "scheduled", "all" ], "default" : "all" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The number of results to return.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "$ref" : "#/components/parameters/SpaceFieldsParameter" }, { "$ref" : "#/components/parameters/SpaceExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TopicFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2SpacesSearchResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/spaces/{id}" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "space.read", "tweet.read", "users.read" ] } ], "tags" : [ "Spaces" ], "summary" : "Get space by ID", "description" : "Retrieves details of a specific space by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces-id" }, "operationId" : "getSpacesById", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the Space to be retrieved.", "required" : true, "example" : "1YqKDqWqdPLsV", "schema" : { "type" : "string", "description" : "The unique identifier of this Space.", "pattern" : "^[a-zA-Z0-9]{1,13}$", "example" : "1SLjjRYNejbKM" }, "style" : "simple" }, { "$ref" : "#/components/parameters/SpaceFieldsParameter" }, { "$ref" : "#/components/parameters/SpaceExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/TopicFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2SpacesIdResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/spaces/{id}/buyers" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "space.read", "tweet.read", "users.read" ] } ], "tags" : [ "Spaces", "Tweets" ], "summary" : "Get Space ticket buyers", "description" : "Retrieves a list of Users who purchased tickets to a specific Space by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces-id-buyers" }, "operationId" : "getSpacesBuyers", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the Space to be retrieved.", "required" : true, "example" : "1YqKDqWqdPLsV", "schema" : { "type" : "string", "description" : "The unique identifier of this Space.", "pattern" : "^[a-zA-Z0-9]{1,13}$", "example" : "1SLjjRYNejbKM" }, "style" : "simple" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken32" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2SpacesIdBuyersResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/spaces/{id}/tweets" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "space.read", "tweet.read", "users.read" ] } ], "tags" : [ "Spaces", "Tweets" ], "summary" : "Get Space Posts", "description" : "Retrieves a list of Posts shared in a specific Space by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces-id-tweets" }, "operationId" : "getSpacesPosts", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the Space to be retrieved.", "required" : true, "example" : "1YqKDqWqdPLsV", "schema" : { "type" : "string", "description" : "The unique identifier of this Space.", "pattern" : "^[a-zA-Z0-9]{1,13}$", "example" : "1SLjjRYNejbKM" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The number of Posts to fetch from the provided space. If not provided, the value will default to the maximum of 100.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100, "example" : 25 }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2SpacesIdTweetsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/trends/by/woeid/{woeid}" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Trends" ], "summary" : "Get Trends by WOEID", "description" : "Retrieves trending topics for a specific location identified by its WOEID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/trends/api-reference/get-trends-by-woeid" }, "operationId" : "getTrendsByWoeid", "parameters" : [ { "name" : "woeid", "in" : "path", "description" : "The WOEID of the place to lookup a trend for.", "required" : true, "example" : "2244994945", "schema" : { "type" : "integer", "format" : "int32" }, "style" : "simple" }, { "name" : "max_trends", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 50, "format" : "int32", "default" : 20 }, "style" : "form" }, { "$ref" : "#/components/parameters/TrendFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TrendsByWoeidWoeidResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get Posts by IDs", "description" : "Retrieves details of multiple Posts by their IDs.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/api-reference/get-tweets" }, "operationId" : "getPostsByIds", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma separated list of Post IDs. Up to 100 are allowed in a single request.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "$ref" : "#/components/schemas/TweetId" } }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "tweet.write", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Create or Edit Post", "description" : "Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Supports paid partnership disclosure via the paid_partnership field.", "externalDocs" : { "url" : "https://developer.x.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets" }, "operationId" : "createPosts", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TweetCreateRequest" } } }, "required" : true }, "responses" : { "201" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TweetCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/analytics" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get Post analytics", "description" : "Retrieves analytics data for specified Posts within a defined time range.", "operationId" : "getPostsAnalytics", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma separated list of Post IDs. Up to 100 are allowed in a single request.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "$ref" : "#/components/schemas/TweetId" } }, "explode" : false, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range.", "required" : true, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range.", "required" : true, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "granularity", "in" : "query", "description" : "The granularity for the search counts results.", "required" : true, "schema" : { "type" : "string", "enum" : [ "hourly", "daily", "weekly", "total" ], "default" : "total" }, "style" : "form" }, { "$ref" : "#/components/parameters/AnalyticsFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Analytics" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/compliance/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Compliance" ], "summary" : "Stream Posts compliance data", "description" : "Streams all compliance data related to Posts.", "operationId" : "streamPostsCompliance", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 4, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Post Compliance events will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TweetComplianceStreamResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/counts/all" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get count of all Posts", "description" : "Retrieves the count of Posts matching a search query from the full archive.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" }, "operationId" : "getPostsCountsAll", "parameters" : [ { "name" : "query", "in" : "query", "description" : "One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length.", "required" : true, "schema" : { "type" : "string", "minLength" : 1, "maxLength" : 4096, "example" : "(from:TwitterDev OR from:TwitterAPI) has:media -is:retweet" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "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).", "required" : false, "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "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).", "required" : false, "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "since_id", "in" : "query", "description" : "Returns results with a Post ID greater than (that is, more recent than) the specified ID.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "until_id", "in" : "query", "description" : "Returns results with a Post ID less than (that is, older than) the specified ID.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "next_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "granularity", "in" : "query", "description" : "The granularity for the search counts results.", "required" : false, "schema" : { "type" : "string", "enum" : [ "minute", "hour", "day" ], "default" : "hour" }, "style" : "form" }, { "$ref" : "#/components/parameters/SearchCountFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsCountsAllResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/counts/recent" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get count of recent Posts", "description" : "Retrieves the count of Posts from the last 7 days matching a search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/counts/api-reference/get-tweets-counts-recent" }, "operationId" : "getPostsCountsRecent", "parameters" : [ { "name" : "query", "in" : "query", "description" : "One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length.", "required" : true, "schema" : { "type" : "string", "minLength" : 1, "maxLength" : 4096, "example" : "(from:TwitterDev OR from:TwitterAPI) has:media -is:retweet" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "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).", "required" : false, "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "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).", "required" : false, "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "since_id", "in" : "query", "description" : "Returns results with a Post ID greater than (that is, more recent than) the specified ID.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "until_id", "in" : "query", "description" : "Returns results with a Post ID less than (that is, older than) the specified ID.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "next_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "granularity", "in" : "query", "description" : "The granularity for the search counts results.", "required" : false, "schema" : { "type" : "string", "enum" : [ "minute", "hour", "day" ], "default" : "hour" }, "style" : "form" }, { "$ref" : "#/components/parameters/SearchCountFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsCountsRecentResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/firehose/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Stream all Posts", "description" : "Streams all public Posts in real-time.", "operationId" : "streamPostsFirehose", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 20, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/StreamingTweetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/firehose/stream/lang/en" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Stream English Posts", "description" : "Streams all public English-language Posts in real-time.", "operationId" : "streamPostsFirehoseEn", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 8, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/StreamingTweetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/firehose/stream/lang/ja" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Stream Japanese Posts", "description" : "Streams all public Japanese-language Posts in real-time.", "operationId" : "streamPostsFirehoseJa", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 2, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/StreamingTweetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/firehose/stream/lang/ko" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Stream Korean Posts", "description" : "Streams all public Korean-language Posts in real-time.", "operationId" : "streamPostsFirehoseKo", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 2, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/StreamingTweetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/firehose/stream/lang/pt" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Stream Portuguese Posts", "description" : "Streams all public Portuguese-language Posts in real-time.", "operationId" : "streamPostsFirehosePt", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 2, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/StreamingTweetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/label/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Compliance" ], "summary" : "Stream Post labels", "description" : "Streams all labeling events applied to Posts.", "operationId" : "streamLabelsCompliance", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TweetLabelStreamResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/sample/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Stream sampled Posts", "description" : "Streams a 1% sample of public Posts in real-time.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/volume-streams/api-reference/get-tweets-sample-stream" }, "operationId" : "streamPostsSample", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/StreamingTweetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/sample10/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Stream 10% sampled Posts", "description" : "Streams a 10% sample of public Posts in real-time.", "operationId" : "streamPostsSample10", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 2, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsSample10StreamResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/search/all" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Search all Posts", "description" : "Retrieves Posts from the full archive matching a search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" }, "operationId" : "searchPostsAll", "parameters" : [ { "name" : "query", "in" : "query", "description" : "One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length.", "required" : true, "schema" : { "type" : "string", "minLength" : 1, "maxLength" : 4096, "example" : "(from:TwitterDev OR from:TwitterAPI) has:media -is:retweet" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "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).", "required" : false, "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "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).", "required" : false, "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "since_id", "in" : "query", "description" : "Returns results with a Post ID greater than (that is, more recent than) the specified ID.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "until_id", "in" : "query", "description" : "Returns results with a Post ID less than (that is, older than) the specified ID.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of search results to be returned by a request.", "required" : false, "schema" : { "type" : "integer", "minimum" : 10, "maximum" : 500, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "next_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "sort_order", "in" : "query", "description" : "This order in which to return results.", "required" : false, "schema" : { "type" : "string", "enum" : [ "recency", "relevancy" ] }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsSearchAllResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/search/recent" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Search recent Posts", "description" : "Retrieves Posts from the last 7 days matching a search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-recent" }, "operationId" : "searchPostsRecent", "parameters" : [ { "name" : "query", "in" : "query", "description" : "One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length.", "required" : true, "schema" : { "type" : "string", "minLength" : 1, "maxLength" : 4096, "example" : "(from:TwitterDev OR from:TwitterAPI) has:media -is:retweet" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "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).", "required" : false, "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "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).", "required" : false, "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "since_id", "in" : "query", "description" : "Returns results with a Post ID greater than (that is, more recent than) the specified ID.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "until_id", "in" : "query", "description" : "Returns results with a Post ID less than (that is, older than) the specified ID.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of search results to be returned by a request.", "required" : false, "schema" : { "type" : "integer", "minimum" : 10, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "next_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "sort_order", "in" : "query", "description" : "This order in which to return results.", "required" : false, "schema" : { "type" : "string", "enum" : [ "recency", "relevancy" ] }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsSearchRecentResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/search/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Stream filtered Posts", "description" : "Streams Posts in real-time matching the active rule set.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream" }, "operationId" : "streamPosts", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/FilteredStreamingTweetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/tweets/search/stream/rules" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Get stream rules", "description" : "Retrieves the active rule set or a subset of rules for the filtered stream.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream-rules" }, "operationId" : "getRules", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of Rule IDs.", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/RuleId" } }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 1000, "format" : "int32", "default" : 1000 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This value is populated by passing the 'next_token' returned in a request to paginate through results.", "required" : false, "schema" : { "type" : "string", "minLength" : 16, "maxLength" : 16 }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RulesLookupResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Update stream rules", "description" : "Adds or deletes rules from the active rule set for the filtered stream.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/post-tweets-search-stream-rules" }, "operationId" : "updateRules", "parameters" : [ { "name" : "dry_run", "in" : "query", "description" : "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.", "required" : false, "schema" : { "type" : "boolean" }, "style" : "form" }, { "name" : "delete_all", "in" : "query", "description" : "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.", "required" : false, "schema" : { "type" : "boolean" }, "style" : "form" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AddOrDeleteRulesRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AddOrDeleteRulesResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/search/stream/rules/counts" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Tweets" ], "summary" : "Get stream rule counts", "description" : "Retrieves the count of rules in the active rule set for the filtered stream.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream-rules-counts" }, "operationId" : "getRuleCounts", "parameters" : [ { "$ref" : "#/components/parameters/RulesCountFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsSearchStreamRulesCountsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/search/webhooks" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Webhooks", "Stream" ], "summary" : "Get stream links", "description" : "Get a list of webhook links associated with a filtered stream ruleset.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, "operationId" : "getWebhooksStreamLinks", "parameters" : [ ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookLinksGetResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/search/webhooks/{webhook_id}" : { "delete" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Webhooks", "Stream" ], "summary" : "Delete stream link", "description" : "Deletes a link from FilteredStream events to the given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, "operationId" : "deleteWebhooksStreamLink", "parameters" : [ { "name" : "webhook_id", "in" : "path", "description" : "The webhook ID to link to your FilteredStream ruleset.", "required" : true, "schema" : { "$ref" : "#/components/schemas/WebhookConfigId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookLinksDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Webhooks", "Stream" ], "summary" : "Create stream link", "description" : "Creates a link to deliver FilteredStream events to the given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, "operationId" : "createWebhooksStreamLink", "parameters" : [ { "name" : "webhook_id", "in" : "path", "description" : "The webhook ID to link to your FilteredStream ruleset.", "required" : true, "schema" : { "$ref" : "#/components/schemas/WebhookConfigId" }, "style" : "simple" }, { "name" : "tweet.fields", "in" : "query", "description" : "A comma separated list of Tweet fields to display.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "name" : "expansions", "in" : "query", "description" : "A comma separated list of fields to expand.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "name" : "media.fields", "in" : "query", "description" : "A comma separated list of Media fields to display.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "name" : "poll.fields", "in" : "query", "description" : "A comma separated list of Poll fields to display.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "name" : "user.fields", "in" : "query", "description" : "A comma separated list of User fields to display.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" }, { "name" : "place.fields", "in" : "query", "description" : "A comma separated list of Place fields to display.", "required" : false, "schema" : { "type" : "string" }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookLinksCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/{id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "tweet.write", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Delete Post", "description" : "Deletes a specific Post by its ID, if owned by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/delete-tweets-id" }, "operationId" : "deletePosts", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the Post to be deleted.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TweetDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get Post by ID", "description" : "Retrieves details of a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/api-reference/get-tweets-id" }, "operationId" : "getPostsById", "parameters" : [ { "name" : "id", "in" : "path", "description" : "A single Post ID.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsIdResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/{id}/liking_users" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "like.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets", "Users" ], "summary" : "Get Liking Users", "description" : "Retrieves a list of Users who liked a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/get-tweets-id-liking_users" }, "operationId" : "getPostsLikingUsers", "parameters" : [ { "name" : "id", "in" : "path", "description" : "A single Post ID.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsIdLikingUsersResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/{id}/quote_tweets" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get Quoted Posts", "description" : "Retrieves a list of Posts that quote a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/quote-tweets/api-reference/get-tweets-id-quote_tweets" }, "operationId" : "getPostsQuotedPosts", "parameters" : [ { "name" : "id", "in" : "path", "description" : "A single Post ID.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results to be returned.", "required" : false, "schema" : { "type" : "integer", "minimum" : 10, "maximum" : 100, "format" : "int32", "default" : 10 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "exclude", "in" : "query", "description" : "The set of entities to exclude (e.g. 'replies' or 'retweets').", "required" : false, "schema" : { "type" : "array", "minItems" : 1, "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "replies", "retweets" ] }, "example" : [ "replies", "retweets" ] }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsIdQuoteTweetsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/{id}/retweeted_by" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets", "Users" ], "summary" : "Get Reposted by", "description" : "Retrieves a list of Users who reposted a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/retweets/api-reference/get-tweets-id-retweeted_by" }, "operationId" : "getPostsRepostedBy", "parameters" : [ { "name" : "id", "in" : "path", "description" : "A single Post ID.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsIdRetweetedByResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/{id}/retweets" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Get Reposts", "description" : "Retrieves a list of Posts that repost a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/retweets/api-reference/get-tweets-id-retweets" }, "operationId" : "getPostsReposts", "parameters" : [ { "name" : "id", "in" : "path", "description" : "A single Post ID.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2TweetsIdRetweetsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/tweets/{tweet_id}/hidden" : { "put" : { "security" : [ { "OAuth2UserToken" : [ "tweet.moderate.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Tweets" ], "summary" : "Hide reply", "description" : "Hides or unhides a reply to a conversation owned by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/hide-replies/api-reference/put-tweets-id-hidden" }, "operationId" : "hidePostsReply", "parameters" : [ { "name" : "tweet_id", "in" : "path", "description" : "The ID of the reply that you want to hide or unhide.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TweetHideRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TweetHideResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/usage/tweets" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Usage" ], "summary" : "Get usage", "description" : "Retrieves usage statistics for Posts over a specified number of days.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/usage/tweets/api-reference/get-usage-tweets" }, "operationId" : "getUsage", "parameters" : [ { "name" : "days", "in" : "query", "description" : "The number of days for which you need usage for.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 90, "format" : "int32", "default" : 7 }, "style" : "form" }, { "$ref" : "#/components/parameters/UsageFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsageTweetsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get Users by IDs", "description" : "Retrieves details of multiple Users by their IDs.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users" }, "operationId" : "getUsersByIds", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A list of User IDs, comma-separated. You can specify up to 100 IDs.", "required" : true, "example" : "2244994945,6253282,12", "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "$ref" : "#/components/schemas/UserId" } }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/by" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get Users by usernames", "description" : "Retrieves details of multiple Users by their usernames.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by" }, "operationId" : "getUsersByUsernames", "parameters" : [ { "name" : "usernames", "in" : "query", "description" : "A list of usernames, comma-separated.", "required" : true, "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "type" : "string", "description" : "The X handle (screen name) of this User.", "pattern" : "^[A-Za-z0-9_]{1,15}$" }, "example" : "TwitterDev,TwitterAPI" }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersByResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/by/username/{username}" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get User by username", "description" : "Retrieves details of a specific User by their username.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by-username-username" }, "operationId" : "getUsersByUsername", "parameters" : [ { "name" : "username", "in" : "path", "description" : "A username.", "required" : true, "example" : "TwitterDev", "schema" : { "type" : "string", "pattern" : "^[A-Za-z0-9_]{1,15}$" }, "style" : "simple" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersByUsernameUsernameResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/compliance/stream" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Stream", "Compliance" ], "summary" : "Stream Users compliance data", "description" : "Streams all compliance data related to Users.", "operationId" : "streamUsersCompliance", "parameters" : [ { "name" : "backfill_minutes", "in" : "query", "description" : "The number of minutes of backfill requested.", "required" : false, "schema" : { "type" : "integer", "minimum" : 0, "maximum" : 5, "format" : "int32" }, "style" : "form" }, { "name" : "partition", "in" : "query", "description" : "The partition number.", "required" : true, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 4, "format" : "int32" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UserComplianceStreamResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } }, "x-twitter-streaming" : true } }, "/2/users/me" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get my User", "description" : "Retrieves details of the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me" }, "operationId" : "getUsersMe", "parameters" : [ { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersMeResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/personalized_trends" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Trends" ], "summary" : "Get personalized Trends", "description" : "Retrieves personalized trending topics for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "getTrendsPersonalizedTrends", "parameters" : [ { "$ref" : "#/components/parameters/PersonalizedTrendFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersPersonalizedTrendsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/public_keys" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Chat" ], "summary" : "Get public keys for multiple users", "description" : "Returns the public keys and Juicebox configuration for the specified users.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "getUsersPublicKeys", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A list of User IDs, comma-separated. You can specify up to 100 IDs.", "required" : true, "example" : "2244994945,6253282,12", "schema" : { "type" : "array", "minItems" : 1, "maxItems" : 100, "items" : { "$ref" : "#/components/schemas/UserId" } }, "explode" : false, "style" : "form" }, { "$ref" : "#/components/parameters/PublicKeyFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersPublicKeysResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/reposts_of_me" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "timeline.read", "tweet.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get Reposts of me", "description" : "Retrieves a list of Posts that repost content from the authenticated user.", "externalDocs" : { "url" : "https://docs.x.com/x-api/posts/retweets/quickstart/retweets-of-me#retweets-of-me" }, "operationId" : "getUsersRepostsOfMe", "parameters" : [ { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersRepostsOfMeResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/search" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Search Users", "description" : "Retrieves a list of Users matching a search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-search" }, "operationId" : "searchUsers", "parameters" : [ { "name" : "query", "in" : "query", "description" : "TThe the query string by which to query for users.", "required" : true, "example" : "someXUser", "schema" : { "$ref" : "#/components/schemas/UserSearchQueryVnext" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 1000, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "next_token", "in" : "query", "description" : "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.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersSearchResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get User by ID", "description" : "Retrieves details of a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-id" }, "operationId" : "getUsersById", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/affiliates" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get affiliates", "description" : "Retrieves a list of Users who are affiliated with a specific organization User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/affiliates/api-reference/get-users-id-affiliates" }, "operationId" : "getUsersAffiliates", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 1000, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationTokenLong" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdAffiliatesResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/blocking" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "block.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get blocking", "description" : "Retrieves a list of Users blocked by the specified User ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/blocks/api-reference/get-users-blocking" }, "operationId" : "getUsersBlocking", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User for whom to return results.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 1000, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken32" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdBlockingResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/bookmarks" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "bookmark.read", "tweet.read", "users.read" ] } ], "tags" : [ "Users", "Bookmarks" ], "summary" : "Get Bookmarks", "description" : "Retrieves a list of Posts bookmarked by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/bookmarks/api-reference/get-users-id-bookmarks" }, "operationId" : "getUsersBookmarks", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User for whom to return results.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdBookmarksResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "bookmark.write", "tweet.read", "users.read" ] } ], "tags" : [ "Users", "Bookmarks" ], "summary" : "Create Bookmark", "description" : "Adds a post to the authenticated user’s bookmarks.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/bookmarks/api-reference/post-users-id-bookmarks" }, "operationId" : "createUsersBookmark", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User for whom to add bookmarks.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BookmarkAddRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BookmarkMutationResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/bookmarks/folders" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "bookmark.read", "users.read" ] } ], "tags" : [ "Users", "Bookmarks" ], "summary" : "Get Bookmark folders", "description" : "Retrieves a list of Bookmark folders created by the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com" }, "operationId" : "getUsersBookmarkFolders", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User for whom to return results.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BookmarkFoldersResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/bookmarks/folders/{folder_id}" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "bookmark.read", "tweet.read", "users.read" ] } ], "tags" : [ "Users", "Bookmarks" ], "summary" : "Get Bookmarks by folder ID", "description" : "Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com" }, "operationId" : "getUsersBookmarksByFolderId", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User for whom to return results.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "folder_id", "in" : "path", "description" : "The ID of the Bookmark Folder that the authenticated User is trying to fetch Posts for.", "required" : true, "schema" : { "$ref" : "#/components/schemas/BookmarkFolderId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BookmarkFolderPostsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/bookmarks/{tweet_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "bookmark.write", "tweet.read", "users.read" ] } ], "tags" : [ "Users", "Bookmarks" ], "summary" : "Delete Bookmark", "description" : "Removes a Post from the authenticated user’s Bookmarks by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/bookmarks/api-reference/delete-users-id-bookmarks-tweet_id" }, "operationId" : "deleteUsersBookmark", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User whose bookmark is to be removed.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "tweet_id", "in" : "path", "description" : "The ID of the Post that the source User is removing from bookmarks.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BookmarkMutationResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/dm/block" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Block DMs", "description" : "Blocks direct messages to or from a specific User by their ID for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "blockUsersDms", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the target User that the authenticated user requesting to block dms for.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersDMBlockCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/dm/unblock" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Unblock DMs", "description" : "Unblocks direct messages to or from a specific User by their ID for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "unblockUsersDms", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the target User that the authenticated user requesting to unblock dms for.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersDMUnBlockCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/followed_lists" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Lists" ], "summary" : "Get followed Lists", "description" : "Retrieves a list of Lists followed by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/get-users-id-followed_lists" }, "operationId" : "getUsersFollowedLists", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationTokenLong" }, "style" : "form" }, { "$ref" : "#/components/parameters/ListFieldsParameter" }, { "$ref" : "#/components/parameters/ListExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdFollowedListsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Lists" ], "summary" : "Follow List", "description" : "Causes the authenticated user to follow a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/post-users-id-followed-lists" }, "operationId" : "followList", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that will follow the List.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListFollowedRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListFollowedResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/followed_lists/{list_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Lists" ], "summary" : "Unfollow List", "description" : "Causes the authenticated user to unfollow a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/delete-users-id-followed-lists-list_id" }, "operationId" : "unfollowList", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that will unfollow the List.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "list_id", "in" : "path", "description" : "The ID of the List to unfollow.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListFollowedResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/followers" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "follows.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get followers", "description" : "Retrieves a list of Users who follow a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/get-users-id-followers" }, "operationId" : "getUsersFollowers", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 1000, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken32" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdFollowersResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/following" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "follows.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get following", "description" : "Retrieves a list of Users followed by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/get-users-id-following" }, "operationId" : "getUsersFollowing", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 1000, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken32" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdFollowingResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "follows.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Follow User", "description" : "Causes the authenticated user to follow a specific user by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/post-users-source_user_id-following" }, "operationId" : "followUser", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that is requesting to follow the target User.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersFollowingCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersFollowingCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/liked_tweets" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "like.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Tweets" ], "summary" : "Get liked Posts", "description" : "Retrieves a list of Posts liked by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/get-users-id-liked_tweets" }, "operationId" : "getUsersLikedPosts", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 5, "maximum" : 100, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdLikedTweetsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/likes" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "like.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Tweets" ], "summary" : "Like Post", "description" : "Causes the authenticated user to Like a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/post-users-id-likes" }, "operationId" : "likePost", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that is requesting to like the Post.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersLikesCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersLikesCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/likes/{tweet_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "like.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Tweets" ], "summary" : "Unlike Post", "description" : "Causes the authenticated user to Unlike a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/delete-users-id-likes-tweet_id" }, "operationId" : "unlikePost", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that is requesting to unlike the Post.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "tweet_id", "in" : "path", "description" : "The ID of the Post that the User is requesting to unlike.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersLikesDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/list_memberships" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Lists" ], "summary" : "Get List memberships", "description" : "Retrieves a list of Lists that a specific User is a member of by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/get-users-id-list_memberships" }, "operationId" : "getUsersListMemberships", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationTokenLong" }, "style" : "form" }, { "$ref" : "#/components/parameters/ListFieldsParameter" }, { "$ref" : "#/components/parameters/ListExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdListMembershipsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/mentions" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Tweets" ], "summary" : "Get mentions", "description" : "Retrieves a list of Posts that mention a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-mentions" }, "operationId" : "getUsersMentions", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "since_id", "in" : "query", "description" : "The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.", "required" : false, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "until_id", "in" : "query", "description" : "The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.", "required" : false, "example" : "1346889436626259968", "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 5, "maximum" : 100, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "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.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "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.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdMentionsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/muting" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "mute.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Get muting", "description" : "Retrieves a list of Users muted by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/get-users-muting" }, "operationId" : "getUsersMuting", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User for whom to return results.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 1000, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationTokenLong" }, "style" : "form" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/UserExpansionsParameter" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdMutingResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "mute.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Mute User", "description" : "Causes the authenticated user to mute a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/post-users-user_id-muting" }, "operationId" : "muteUser", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that is requesting to mute the target User.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MuteUserRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MuteUserMutationResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/owned_lists" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Lists" ], "summary" : "Get owned Lists", "description" : "Retrieves a list of Lists owned by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-lookup/api-reference/get-users-id-owned_lists" }, "operationId" : "getUsersOwnedLists", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32", "default" : 100 }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get a specified 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationTokenLong" }, "style" : "form" }, { "$ref" : "#/components/parameters/ListFieldsParameter" }, { "$ref" : "#/components/parameters/ListExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdOwnedListsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/pinned_lists" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "list.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Lists" ], "summary" : "Get pinned Lists", "description" : "Retrieves a list of Lists pinned by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/get-users-id-pinned_lists" }, "operationId" : "getUsersPinnedLists", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User for whom to return results.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "$ref" : "#/components/parameters/ListFieldsParameter" }, { "$ref" : "#/components/parameters/ListExpansionsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdPinnedListsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Lists" ], "summary" : "Pin List", "description" : "Causes the authenticated user to pin a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/post-users-id-pinned-lists" }, "operationId" : "pinList", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that will pin the List.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListPinnedRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListPinnedResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/pinned_lists/{list_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "list.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Lists" ], "summary" : "Unpin List", "description" : "Causes the authenticated user to unpin a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/delete-users-id-pinned-lists-list_id" }, "operationId" : "unpinList", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User for whom to return results.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "list_id", "in" : "path", "description" : "The ID of the List to unpin.", "required" : true, "schema" : { "$ref" : "#/components/schemas/ListId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ListUnpinResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/public_keys" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "dm.read", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Chat" ], "summary" : "Get user public keys", "description" : "Returns the public keys and Juicebox configuration for the specified user.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "getUsersPublicKey", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "$ref" : "#/components/parameters/PublicKeyFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdPublicKeysResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "OAuth2UserToken" : [ "dm.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Chat" ], "summary" : "Add public key", "description" : "Registers a user's public key for X Chat encryption.", "externalDocs" : { "url" : "https://developer.x.com/" }, "operationId" : "addUserPublicKey", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the requesting user.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatAddPublicKeyRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ChatAddPublicKeyResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/retweets" : { "post" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "tweet.write", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Tweets" ], "summary" : "Repost Post", "description" : "Causes the authenticated user to repost a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/retweets/api-reference/post-users-id-retweets" }, "operationId" : "repostPost", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that is requesting to repost the Post.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersRetweetsCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersRetweetsCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/retweets/{source_tweet_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "tweet.write", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Tweets" ], "summary" : "Unrepost Post", "description" : "Causes the authenticated user to unrepost a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/retweets/api-reference/delete-users-id-retweets-tweet_id" }, "operationId" : "unrepostPost", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User that is requesting to repost the Post.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "source_tweet_id", "in" : "path", "description" : "The ID of the Post that the User is requesting to unretweet.", "required" : true, "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersRetweetsDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/timelines/reverse_chronological" : { "get" : { "security" : [ { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Tweets" ], "summary" : "Get Timeline", "description" : "Retrieves a reverse chronological list of Posts in the authenticated User’s Timeline.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-reverse-chronological" }, "operationId" : "getUsersTimeline", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the authenticated source User to list Reverse Chronological Timeline Posts of.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "since_id", "in" : "query", "description" : "The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.", "required" : false, "example" : "791775337160081409", "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "until_id", "in" : "query", "description" : "The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.", "required" : false, "example" : "1346889436626259968", "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 1, "maximum" : 100, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "exclude", "in" : "query", "description" : "The set of entities to exclude (e.g. 'replies' or 'retweets').", "required" : false, "schema" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "replies", "retweets" ] }, "example" : [ "replies", "retweets" ] }, "explode" : false, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "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.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "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.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdTimelinesReverseChronologicalResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{id}/tweets" : { "get" : { "security" : [ { "BearerToken" : [ ] }, { "OAuth2UserToken" : [ "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users", "Tweets" ], "summary" : "Get Posts", "description" : "Retrieves a list of posts authored by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets" }, "operationId" : "getUsersPosts", "parameters" : [ { "name" : "id", "in" : "path", "description" : "The ID of the User to lookup.", "required" : true, "example" : "2244994945", "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" }, { "name" : "since_id", "in" : "query", "description" : "The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.", "required" : false, "example" : "791775337160081409", "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "until_id", "in" : "query", "description" : "The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.", "required" : false, "example" : "1346889436626259968", "schema" : { "$ref" : "#/components/schemas/TweetId" }, "style" : "form" }, { "name" : "max_results", "in" : "query", "description" : "The maximum number of results.", "required" : false, "schema" : { "type" : "integer", "minimum" : 5, "maximum" : 100, "format" : "int32" }, "style" : "form" }, { "name" : "pagination_token", "in" : "query", "description" : "This parameter is used to get the next 'page' of results.", "required" : false, "schema" : { "$ref" : "#/components/schemas/PaginationToken36" }, "style" : "form" }, { "name" : "exclude", "in" : "query", "description" : "The set of entities to exclude (e.g. 'replies' or 'retweets').", "required" : false, "schema" : { "type" : "array", "minItems" : 1, "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "replies", "retweets" ] }, "example" : [ "replies", "retweets" ] }, "explode" : false, "style" : "form" }, { "name" : "start_time", "in" : "query", "description" : "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.", "required" : false, "example" : "2021-02-01T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "name" : "end_time", "in" : "query", "description" : "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.", "required" : false, "example" : "2021-02-14T18:40:40.000Z", "schema" : { "type" : "string", "format" : "date-time" }, "style" : "form" }, { "$ref" : "#/components/parameters/TweetFieldsParameter" }, { "$ref" : "#/components/parameters/TweetExpansionsParameter" }, { "$ref" : "#/components/parameters/MediaFieldsParameter" }, { "$ref" : "#/components/parameters/PollFieldsParameter" }, { "$ref" : "#/components/parameters/UserFieldsParameter" }, { "$ref" : "#/components/parameters/PlaceFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2UsersIdTweetsResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{source_user_id}/following/{target_user_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "follows.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Unfollow User", "description" : "Causes the authenticated user to unfollow a specific user by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/delete-users-source_id-following" }, "operationId" : "unfollowUser", "parameters" : [ { "name" : "source_user_id", "in" : "path", "description" : "The ID of the authenticated source User that is requesting to unfollow the target User.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "target_user_id", "in" : "path", "description" : "The ID of the User that the source User is requesting to unfollow.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsersFollowingDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/users/{source_user_id}/muting/{target_user_id}" : { "delete" : { "security" : [ { "OAuth2UserToken" : [ "mute.write", "tweet.read", "users.read" ] }, { "UserToken" : [ ] } ], "tags" : [ "Users" ], "summary" : "Unmute User", "description" : "Causes the authenticated user to unmute a specific user by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/delete-users-user_id-muting" }, "operationId" : "unmuteUser", "parameters" : [ { "name" : "source_user_id", "in" : "path", "description" : "The ID of the authenticated source User that is requesting to unmute the target User.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserIdMatchesAuthenticatedUser" }, "style" : "simple" }, { "name" : "target_user_id", "in" : "path", "description" : "The ID of the User that the source User is requesting to unmute.", "required" : true, "schema" : { "$ref" : "#/components/schemas/UserId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MuteUserMutationResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/webhooks" : { "get" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Webhooks" ], "summary" : "Get webhook", "description" : "Get a list of webhook configs associated with a client app.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, "operationId" : "getWebhooks", "parameters" : [ { "$ref" : "#/components/parameters/WebhookConfigFieldsParameter" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Get2WebhooksResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "post" : { "security" : [ { "BearerToken" : [ ] }, { "UserToken" : [ ] } ], "tags" : [ "Webhooks" ], "summary" : "Create webhook", "description" : "Creates a new webhook configuration.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, "operationId" : "createWebhooks", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookConfigCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookConfigCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/webhooks/replay" : { "post" : { "security" : [ { "BearerToken" : [ ] } ], "tags" : [ "Webhooks" ], "summary" : "Create replay job for webhook", "description" : "Creates a replay job to retrieve events from up to the past 24 hours for all events delivered or attempted to be delivered to the webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, "operationId" : "createWebhookReplayJob", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookReplayCreateRequest" } } } }, "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ReplayJobCreateResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } }, "/2/webhooks/{webhook_id}" : { "delete" : { "security" : [ { "BearerToken" : [ ] }, { "UserToken" : [ ] } ], "tags" : [ "Webhooks" ], "summary" : "Delete webhook", "description" : "Deletes an existing webhook configuration.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, "operationId" : "deleteWebhooks", "parameters" : [ { "name" : "webhook_id", "in" : "path", "description" : "The ID of the webhook to delete.", "required" : true, "schema" : { "$ref" : "#/components/schemas/WebhookConfigId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookConfigDeleteResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } }, "put" : { "security" : [ { "BearerToken" : [ ] }, { "UserToken" : [ ] } ], "tags" : [ "Webhooks" ], "summary" : "Validate webhook", "description" : "Triggers a CRC check for a given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, "operationId" : "validateWebhooks", "parameters" : [ { "name" : "webhook_id", "in" : "path", "description" : "The ID of the webhook to check.", "required" : true, "schema" : { "$ref" : "#/components/schemas/WebhookConfigId" }, "style" : "simple" } ], "responses" : { "200" : { "description" : "The request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookConfigPutResponse" } } } }, "default" : { "description" : "The request has failed.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } }, "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } } } } } } } }, "servers" : [ { "description" : "X API", "url" : "https://api.x.com" } ], "tags" : [ { "name" : "Account Activity", "description" : "Endpoints relating to retrieving, managing AAA subscriptions", "externalDocs" : { "description" : "Find out more", "url" : "https://docs.x.com/x-api/enterprise-gnip-2.0/fundamentals/account-activity" } }, { "name" : "Articles", "description" : "Endpoints related to retrieving, creating & modifying Articles", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.x.com/en/docs/twitter-api/tweets/lookup" } }, { "name" : "Bookmarks", "description" : "Endpoints related to retrieving, managing bookmarks of a user", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api/bookmarks" } }, { "name" : "Compliance", "description" : "Endpoints related to keeping X data in your systems compliant", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api/compliance/batch-tweet/introduction" } }, { "name" : "Connections", "description" : "Endpoints related to streaming connections", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.x.com/en/docs/x-api/connections" } }, { "name" : "Direct Messages", "description" : "Endpoints related to retrieving, managing Direct Messages", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api/direct-messages" } }, { "name" : "General", "description" : "Miscellaneous endpoints for general API functionality", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api" } }, { "name" : "Lists", "description" : "Endpoints related to retrieving, managing Lists", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api/lists" } }, { "name" : "Marketplace", "description" : "Endpoints related to marketplace handles", "externalDocs" : { "description" : "Handle marketplace availability", "url" : "https://docs.x.com/x-api/marketplace/handles/availability" } }, { "name" : "Media", "description" : "Endpoints related to Media", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.x.com" } }, { "name" : "MediaUpload", "description" : "Endpoints related to uploading Media", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.x.com" } }, { "name" : "News", "description" : "Endpoint for retrieving news stories", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api/news" } }, { "name" : "Spaces", "description" : "Endpoints related to retrieving, managing Spaces", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces" } }, { "name" : "Stream", "description" : "Endpoints related to streaming", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.x.com" } }, { "name" : "Tweets", "description" : "Endpoints related to retrieving, searching, and modifying Tweets", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/lookup" } }, { "name" : "Users", "description" : "Endpoints related to retrieving, managing relationships of Users", "externalDocs" : { "description" : "Find out more", "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup" } } ], "components" : { "securitySchemes" : { "BearerToken" : { "type" : "http", "scheme" : "bearer" }, "OAuth2UserToken" : { "type" : "oauth2", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://api.x.com/2/oauth2/authorize", "tokenUrl" : "https://api.x.com/2/oauth2/token", "scopes" : { "block.read" : "View accounts you have blocked.", "bookmark.read" : "Read your bookmarked Posts.", "bookmark.write" : "Create and delete your bookmarks.", "dm.read" : "Read all your Direct Messages.", "dm.write" : "Send and manage your Direct Messages.", "follows.read" : "View accounts you follow and accounts following you.", "follows.write" : "Follow and unfollow accounts on your behalf.", "like.read" : "View Posts you have liked and likes you can see.", "like.write" : "Like and unlike Posts on your behalf.", "list.read" : "View Lists, members, and followers of Lists you created or are a member of, including private Lists.", "list.write" : "Create and manage Lists on your behalf.", "media.write" : "Upload media, such as photos and videos, on your behalf.", "mute.read" : "View accounts you have muted.", "mute.write" : "Mute and unmute accounts on your behalf.", "offline.access" : "Request a refresh token for the app.", "space.read" : "View all Spaces you have access to.", "timeline.read" : "View all Custom Timelines you can see, including public Custom Timelines from other developers.", "tweet.moderate.write" : "Hide and unhide replies to your Posts.", "tweet.read" : "View all Posts you can see, including those from protected accounts.", "tweet.write" : "Post and repost on your behalf.", "users.read" : "View any account you can see, including protected accounts." } } } }, "UserToken" : { "type" : "http", "scheme" : "OAuth" } }, "schemas" : { "ActivityEventId" : { "type" : "string", "description" : "The unique identifier of an Activity event.", "pattern" : "^[0-9]{1,19}$", "example" : "1146654567674912769" }, "ActivityStreamingResponse" : { "type" : "object", "description" : "An activity event or error that can be returned by the x activity streaming API.", "properties" : { "data" : { "type" : "object", "properties" : { "event_type" : { "type" : "string" }, "event_uuid" : { "$ref" : "#/components/schemas/ActivityEventId" }, "filter" : { "$ref" : "#/components/schemas/ActivitySubscriptionFilter" }, "includes" : { "$ref" : "#/components/schemas/Expansions" }, "payload" : { "$ref" : "#/components/schemas/ActivityStreamingResponsePayload" }, "tag" : { "type" : "string" } } }, "errors" : { "type" : "array", "minItems" : 1, "items" : { "$ref" : "#/components/schemas/Problem" } } } }, "ActivityStreamingResponsePayload" : { "oneOf" : [ { "$ref" : "#/components/schemas/ProfileUpdateActivityResponsePayload" }, { "$ref" : "#/components/schemas/NewsActivityResponsePayload" }, { "$ref" : "#/components/schemas/FollowActivityResponsePayload" }, { "$ref" : "#/components/schemas/Tweet" }, { "$ref" : "#/components/schemas/PostDeleteActivityResponsePayload" } ], "discriminator" : { "propertyName" : "../event_type", "mapping" : { "follow.follow" : "#/components/schemas/FollowActivityResponsePayload", "follow.unfollow" : "#/components/schemas/FollowActivityResponsePayload", "news.new" : "#/components/schemas/NewsActivityResponsePayload", "post.create" : "#/components/schemas/Tweet", "post.delete" : "#/components/schemas/PostDeleteActivityResponsePayload", "profile.update.affiliate_badge" : "#/components/schemas/ProfileUpdateActivityResponsePayload", "profile.update.banner_picture" : "#/components/schemas/ProfileUpdateActivityResponsePayload", "profile.update.bio" : "#/components/schemas/ProfileUpdateActivityResponsePayload", "profile.update.geo" : "#/components/schemas/ProfileUpdateActivityResponsePayload", "profile.update.handle" : "#/components/schemas/ProfileUpdateActivityResponsePayload", "profile.update.profile_picture" : "#/components/schemas/ProfileUpdateActivityResponsePayload", "profile.update.screenname" : "#/components/schemas/ProfileUpdateActivityResponsePayload", "profile.update.url" : "#/components/schemas/ProfileUpdateActivityResponsePayload", "profile.update.verified_badge" : "#/components/schemas/ProfileUpdateActivityResponsePayload" } } }, "ActivitySubscription" : { "type" : "object", "description" : "An XActivity subscription.", "required" : [ "subscription_id", "event_type", "filter", "created_at", "updated_at" ], "properties" : { "created_at" : { "type" : "string", "format" : "date-time" }, "event_type" : { "type" : "string" }, "filter" : { "$ref" : "#/components/schemas/ActivitySubscriptionFilter" }, "subscription_id" : { "$ref" : "#/components/schemas/ActivitySubscriptionId" }, "tag" : { "type" : "string" }, "updated_at" : { "type" : "string", "format" : "date-time" }, "webhook_id" : { "$ref" : "#/components/schemas/WebhookConfigId" } } }, "ActivitySubscriptionCreateRequest" : { "type" : "object", "required" : [ "event_type", "filter" ], "properties" : { "event_type" : { "type" : "string", "enum" : [ "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", "chat.conversation_join", "dm.sent", "dm.received", "dm.indicate_typing", "dm.read", "post.create", "post.delete" ] }, "filter" : { "$ref" : "#/components/schemas/ActivitySubscriptionFilter" }, "tag" : { "type" : "string", "minLength" : 1, "maxLength" : 200 }, "webhook_id" : { "$ref" : "#/components/schemas/WebhookConfigId" } }, "additionalProperties" : false }, "ActivitySubscriptionCreateResponse" : { "type" : "object", "properties" : { "data" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/ActivitySubscription" }, "total_subscriptions_for_instance_id" : { "type" : "integer" } } }, "errors" : { "type" : "array", "minItems" : 1, "items" : { "$ref" : "#/components/schemas/Problem" } }, "meta" : { "type" : "object", "properties" : { "total_subscriptions" : { "type" : "integer", "description" : "Number of active subscriptions.", "format" : "int32" } } } } }, "ActivitySubscriptionDeleteResponse" : { "type" : "object", "properties" : { "data" : { "type" : "object", "properties" : { "deleted" : { "type" : "boolean" } } }, "errors" : { "type" : "array", "minItems" : 1, "items" : { "$ref" : "#/components/schemas/Problem" } }, "meta" : { "type" : "object", "properties" : { "total_subscriptions" : { "type" : "integer", "description" : "Number of active subscriptions remaining.", "format" : "int32" } } } } }, "ActivitySubscriptionFilter" : { "type" : "object", "description" : "An XAA subscription filter.", "properties" : { "direction" : { "type" : "string", "description" : "Optional direction filter for directional events.", "enum" : [ "inbound", "outbound" ] }, "keyword" : { "$ref" : "#/components/schemas/Keyword" }, "user_id" : { "$ref" : "#/components/schemas/UserId" } }, "additionalProperties" : false }, "ActivitySubscriptionGetResponse" : { "type" : "object", "properties" : { "data" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/ActivitySubscription" } }, "errors" : { "type" : "array", "minItems" : 1, "items" : { "$ref" : "#/components/schemas/Problem" } }, "meta" : { "type" : "object", "properties" : { "next_token" : { "type" : "string", "description" : "Token to retrieve the next page of results." }, "result_count" : { "type" : "integer", "description" : "Number of active subscriptions returned in response.", "format" : "int32" } } } } }, "ActivitySubscriptionId" : { "type" : "string", "description" : "The unique identifier of this subscription.", "pattern" : "^[0-9]{1,19}$", "example" : "1146654567674912769" }, "ActivitySubscriptionUpdateRequest" : { "type" : "object", "properties" : { "tag" : { "type" : "string", "minLength" : 1, "maxLength" : 200 }, "webhook_id" : { "$ref" : "#/components/schemas/WebhookConfigId" } }, "additionalProperties" : false }, "ActivitySubscriptionUpdateResponse" : { "type" : "object", "properties" : { "data" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/ActivitySubscription" }, "total_subscriptions" : { "type" : "integer", "description" : "Number of active subscriptions.", "format" : "int32" } } } } }, "AddOrDeleteRulesRequest" : { "oneOf" : [ { "$ref" : "#/components/schemas/AddRulesRequest" }, { "$ref" : "#/components/schemas/DeleteRulesRequest" } ] }, "AddOrDeleteRulesResponse" : { "type" : "object", "description" : "A response from modifying user-specified stream filtering rules.", "required" : [ "meta" ], "properties" : { "data" : { "type" : "array", "description" : "All user-specified stream filtering rules that were created.", "items" : { "$ref" : "#/components/schemas/Rule" } }, "errors" : { "type" : "array", "minItems" : 1, "items" : { "$ref" : "#/components/schemas/Problem" } }, "meta" : { "$ref" : "#/components/schemas/RulesResponseMetadata" } } }, "AddRulesRequest" : { "type" : "object", "description" : "A request to add a user-specified stream filtering rule.", "required" : [ "add" ], "properties" : { "add" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/RuleNoId" } } } }, "Aggregate" : { "type" : "integer", "description" : "The sum of results returned in this response.", "format" : "int32" }, "AllProjectClientApps" : { "type" : "array", "description" : "Client App Rule Counts for all applications in the project", "items" : { "$ref" : "#/components/schemas/AppRulesCount" } }, "AllowDownloadStatus" : { "type" : "object", "properties" : { "allow_download" : { "type" : "boolean", "example" : true } } }, "AltText" : { "type" : "object", "required" : [ "text" ], "properties" : { "text" : { "type" : "string", "description" : "Description of media (