openapi: 3.2.0 info: description: X API v2 core endpoints version: '2.168' title: X API v2 Chat API 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 servers: - description: X API url: https://api.x.com tags: - name: Chat description: Endpoints related to Chat encrypted messaging externalDocs: description: Find out more url: https://developer.x.com/ paths: /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 required: false schema: type: integer minimum: 1 maximum: 100 format: int32 default: 10 style: form - name: pagination_token in: query 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/GetChatConversationsResponse' 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: - tweet.read - users.read - dm.write - 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 requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateChatConversationRequest' required: true responses: '201': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/CreateChatConversationResponse' 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 Chat group conversation and returns a unique conversation ID. Use the returned conversation_id in a subsequent POST /chat/conversations/group call to fully create and configure the group. externalDocs: url: https://developer.x.com/ operationId: initializeChatGroup responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/InitializeChatGroupResponse' 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: - tweet.read - users.read - dm.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 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/GetChatConversationResponse' 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 required: true schema: type: string pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$ style: simple - name: max_results in: query required: false schema: type: integer minimum: 1 maximum: 100 format: int32 default: 10 style: form - name: pagination_token in: query 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/GetChatConversationEventsResponse' 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: - users.read - dm.write - tweet.read - UserToken: [] tags: - Chat summary: Add Conversation Keys description: Adds (initializes or rotates) the encryption keys for a Chat conversation. Call this before sending messages in a new 1:1 conversation, and again with a newer key version to rotate the conversation key. For 1:1 conversations, provide the recipient's user ID as the conversation id; the server constructs the canonical conversation ID from the authenticated user and recipient. The request body must contain the conversation key version and participant keys (the conversation key encrypted for each participant using their public key). externalDocs: url: https://developer.x.com/ operationId: addConversationKeys parameters: - name: id in: path required: true schema: type: string pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$ style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/AddConversationKeysRequest' required: true responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/AddConversationKeysResponse' 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: - users.read - tweet.read - dm.write - 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 required: true schema: type: string pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$ style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/AddChatGroupMembersRequest' required: true responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/AddChatGroupMembersResponse' 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 - users.read - tweet.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 required: true schema: type: string pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$ style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/SendChatMessageRequest' required: true responses: '201': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/SendChatMessageResponse' 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/delete: post: security: - OAuth2UserToken: - tweet.read - users.read - dm.write - UserToken: [] tags: - Chat summary: Delete Chat messages description: Deletes one or more messages from a Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Delete for all removes a message you sent (or, in groups you administer, any message) for every participant; delete for self removes any message only from your own view. externalDocs: url: https://developer.x.com/ operationId: deleteChatMessages parameters: - name: id in: path required: true schema: type: string pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$ style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/DeleteChatMessagesRequest' required: true responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/DeleteChatMessagesResponse' 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: - tweet.read - dm.write - 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 required: true schema: type: string pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$ style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/MarkChatConversationReadRequest' required: true responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/MarkChatConversationReadResponse' 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: - tweet.read - dm.write - 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 required: true schema: type: string pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$ style: simple responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/SendChatTypingIndicatorResponse' 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 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 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/ChatMediaUploadAppendResponse' 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 required: true schema: type: string pattern: ^[0-9]{1,19}$ 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. operationId: chatMediaDownload parameters: - name: id in: path required: true schema: type: string pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$ style: simple - name: media_hash_key in: path required: true schema: type: string pattern: ^[a-zA-Z0-9]{1,50}$ style: simple responses: '200': description: The request has succeeded. content: application/octet-stream: schema: type: string format: binary 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: post: security: - OAuth2UserToken: - tweet.read - users.read - dm.write - 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 required: true schema: $ref: '#/components/schemas/UserId' style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/AddUserPublicKeyRequest' required: true responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/AddUserPublicKeyResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' components: schemas: AddConversationKeysActionSignaturesMessageEventSignature: type: object required: - signature - public_key_version - signature_version properties: message_signing_key_info_list: type: array description: List of signing key information for message verification. items: $ref: '#/components/schemas/AddConversationKeysActionSignaturesMessageEventSignatureMessageSigningKeyInfoList' public_key_version: type: string description: The version of the public key used for signing. pattern: ^[0-9]+$ signature: type: string description: The signature of the message event. minLength: 1 pattern: ^[A-Za-z0-9+/=_-]+$ signature_version: type: string description: The version of the signature algorithm. pattern: ^[0-9]+$ signing_public_key: type: string description: The public key used for signing. FieldHydrationFailureProblem: type: object required: - type - title - detail - field properties: detail: type: string field: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/field-hydration-failure CreateChatConversationActionSignatures: type: object required: - message_id - encoded_message_event_detail - message_event_signature properties: encoded_message_event_detail: type: string description: Base64-encoded message event detail. minLength: 1 pattern: ^[A-Za-z0-9+/=_-]+$ message_event_signature: description: Message event signature supplied with an action signature. $ref: '#/components/schemas/CreateChatConversationActionSignaturesMessageEventSignature' message_id: type: string description: Client-generated ID of the message being signed. minLength: 1 signature_payload: type: string description: Payload string the client signed; used only in server-side failure logs. DeleteChatMessagesActionSignaturesMessageEventSignature: type: object required: - signature - public_key_version - signature_version properties: message_signing_key_info_list: type: array description: List of signing key information for message verification. items: $ref: '#/components/schemas/DeleteChatMessagesActionSignaturesMessageEventSignatureMessageSigningKeyInfoList' public_key_version: type: string description: The version of the public key used for signing. pattern: ^[0-9]+$ signature: type: string description: The signature of the message event. minLength: 1 pattern: ^[A-Za-z0-9+/=_-]+$ signature_version: type: string description: The version of the signature algorithm. pattern: ^[0-9]+$ signing_public_key: type: string description: The public key used for signing. Poll: type: object properties: duration_minutes: type: integer end_datetime: type: string id: type: string options: $ref: '#/components/schemas/PollOptions' voting_status: type: string UserWithheld: type: object description: Withholding details for withheld content. properties: country_codes: type: - array - 'null' description: A list of countries (as ISO 3166-1 alpha-2 codes) where this content is withheld. items: type: string scope: type: - string - 'null' description: The scope of the withholding. Only present, with the value "user", when the entire User is withheld. enum: - user Error: type: object required: - code - message properties: code: type: integer format: int32 message: type: string ResourceUnavailableProblem: type: object required: - type - title - detail - resource_type properties: detail: type: string resource_id: type: string resource_type: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/resource-unavailable MarkChatConversationReadResponseData: type: object required: - success properties: success: type: boolean description: Whether the conversation was marked read. AddChatGroupMembersActionSignaturesMessageEventSignatureMessageSigningKeyInfoList: type: object properties: member_id: type: string description: The member ID associated with this signing key. public_key_version: type: string description: The version of the public key. signing_public_key: type: string description: The signing public key. UserEntities: type: object description: A list of metadata found in the User's profile description. properties: description: type: - object - 'null' description: Entities found in the User's bio. properties: cashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string hashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string mentions: type: - array - 'null' items: type: object description: A user mention entity. required: - start - end - username properties: end: type: integer format: int64 id: type: - string - 'null' start: type: integer format: int64 username: type: string urls: type: - array - 'null' items: type: object description: A URL entity found in profile text. required: - start - end - url properties: description: type: - string - 'null' description: Description of the linked page, when available. display_url: type: - string - 'null' description: The URL as displayed in the Post text. end: type: integer format: int64 expanded_url: type: - string - 'null' description: The fully resolved URL. images: type: - array - 'null' items: type: object description: A preview image for a linked page. properties: height: type: - integer - 'null' format: int64 url: type: - string - 'null' width: type: - integer - 'null' format: int64 media_key: type: - string - 'null' start: type: integer format: int64 status: type: - integer - 'null' description: HTTP status from resolving the URL. format: int64 title: type: - string - 'null' description: Title of the linked page, when available. unwound_url: type: - string - 'null' description: The final destination after following redirects. url: type: string description: The t.co shortened URL. url: type: - object - 'null' description: Entities for the User's profile website URL. properties: urls: type: - array - 'null' items: type: object description: A URL entity found in profile text. required: - start - end - url properties: description: type: - string - 'null' description: Description of the linked page, when available. display_url: type: - string - 'null' description: The URL as displayed in the Post text. end: type: integer format: int64 expanded_url: type: - string - 'null' description: The fully resolved URL. images: type: - array - 'null' items: type: object description: A preview image for a linked page. properties: height: type: - integer - 'null' format: int64 url: type: - string - 'null' width: type: - integer - 'null' format: int64 media_key: type: - string - 'null' start: type: integer format: int64 status: type: - integer - 'null' description: HTTP status from resolving the URL. format: int64 title: type: - string - 'null' description: Title of the linked page, when available. unwound_url: type: - string - 'null' description: The final destination after following redirects. url: type: string description: The t.co shortened URL. PostMediaMetadata: type: array description: Metadata for media attached to this Post. items: type: object description: Metadata for one media item attached to this Post. properties: alt_text: type: - string - 'null' description: Alternative text describing the media for accessibility. description: type: - string - 'null' description: Description of the media. media_key: type: - string - 'null' description: The unique identifier of the media. title: type: - string - 'null' description: Title of the media. CreateChatConversationConversationParticipantKeys: type: object properties: encrypted_conversation_key: type: string description: Conversation key encrypted with this participant's public key. public_key_version: type: string description: Version of the participant's public key used for encryption. user_id: type: string description: Participant user ID. InternalErrorProblem: type: object required: - type - title - detail properties: detail: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/internal-error AddUserPublicKeyResponse: type: object properties: data: $ref: '#/components/schemas/AddUserPublicKeyResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' PostEditControls: type: object description: Indicates how much longer (if at all) this Post can be edited. properties: editable_until: type: - string - 'null' description: The time until which this Post can be edited. edits_remaining: type: - integer - 'null' description: Number of edits still allowed for this Post. format: int64 is_edit_eligible: type: - boolean - 'null' description: Indicates whether this Post is eligible to be edited. AddConversationKeysResponseData: type: object properties: conversation_id: type: string description: Canonical ID of the conversation. sequence_id: type: string description: Sequence ID of the key change. UserAffiliation: type: object description: Metadata about a user's affiliation. properties: badge_url: type: - string - 'null' description: URL of the affiliation badge image shown on the User's profile. description: type: - string - 'null' description: Description of the affiliation. url: type: - string - 'null' description: URL associated with the affiliation. user_id: type: - array - 'null' description: A list of unique identifiers of the accounts this User is affiliated with. items: type: string Problem: oneOf: - $ref: '#/components/schemas/ResourceNotFoundProblem' - $ref: '#/components/schemas/InvalidRequestProblem' - $ref: '#/components/schemas/NotAuthorizedForResourceProblem' - $ref: '#/components/schemas/NotAuthorizedForFieldProblem' - $ref: '#/components/schemas/FieldUnauthorizedProblem' - $ref: '#/components/schemas/FieldHydrationFailureProblem' - $ref: '#/components/schemas/ResourceUnavailableProblem' - $ref: '#/components/schemas/DisallowedResourceProblem' - $ref: '#/components/schemas/InternalErrorProblem' discriminator: propertyName: type mapping: https://api.x.com/2/problems/disallowed-resource: '#/components/schemas/DisallowedResourceProblem' https://api.x.com/2/problems/field-hydration-failure: '#/components/schemas/FieldHydrationFailureProblem' https://api.x.com/2/problems/field-unauthorized: '#/components/schemas/FieldUnauthorizedProblem' https://api.x.com/2/problems/internal-error: '#/components/schemas/InternalErrorProblem' https://api.x.com/2/problems/invalid-request: '#/components/schemas/InvalidRequestProblem' https://api.x.com/2/problems/not-authorized-for-field: '#/components/schemas/NotAuthorizedForFieldProblem' https://api.x.com/2/problems/not-authorized-for-resource: '#/components/schemas/NotAuthorizedForResourceProblem' https://api.x.com/2/problems/resource-not-found: '#/components/schemas/ResourceNotFoundProblem' https://api.x.com/2/problems/resource-unavailable: '#/components/schemas/ResourceUnavailableProblem' UserSubscription: type: object description: The subscription relationship between this User and you. required: - subscribes_to_you properties: subscribes_to_you: type: boolean description: Indicates if this User subscribes to you. DeleteChatMessagesActionSignatures: type: object required: - message_id - encoded_message_event_detail - message_event_signature properties: encoded_message_event_detail: type: string description: Base64-encoded message event detail. minLength: 1 pattern: ^[A-Za-z0-9+/=_-]+$ message_event_signature: description: Message event signature supplied with an action signature. $ref: '#/components/schemas/DeleteChatMessagesActionSignaturesMessageEventSignature' message_id: type: string description: Client-generated ID of the message being signed. minLength: 1 signature_payload: type: string description: Payload string the client signed; used only in server-side failure logs. CreateChatConversationActionSignaturesMessageEventSignatureMessageSigningKeyInfoList: type: object properties: member_id: type: string description: The member ID associated with this signing key. public_key_version: type: string description: The version of the public key. signing_public_key: type: string description: The signing public key. AddConversationKeysConversationParticipantKeys: type: object properties: encrypted_conversation_key: type: string description: Conversation key encrypted with this participant's public key. public_key_version: type: string description: Version of the participant's public key used for encryption. user_id: type: string description: Participant user ID. InitializeChatGroupResponse: type: object properties: data: $ref: '#/components/schemas/InitializeChatGroupResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' AddChatGroupMembersConversationParticipantKeys: type: object properties: encrypted_conversation_key: type: string description: Conversation key encrypted with this participant's public key. public_key_version: type: string description: Version of the participant's public key used for encryption. user_id: type: string description: Participant user ID. GetChatConversationEventsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/ChatMessageEvent' errors: type: array items: $ref: '#/components/schemas/Problem' meta: type: object properties: conversation_key_events: type: array items: type: string has_more: type: boolean next_token: type: string description: Pagination token for the next page of results. result_count: type: integer description: Number of items in the data array. format: int32 DeleteChatMessagesRequest: type: object required: - sequence_ids - delete_message_action - action_signatures properties: action_signatures: type: array description: Cryptographic signatures for the action. items: $ref: '#/components/schemas/DeleteChatMessagesActionSignatures' delete_message_action: type: string description: delete_for_all removes the messages for every participant; delete_for_self removes them only from the authenticated user's view. enum: - delete_for_all - delete_for_self media_hash_keys: type: array description: Hash keys of encrypted media blobs to delete alongside the messages (delete_for_all only). items: type: string sequence_ids: type: array description: Sequence IDs of the messages to delete. minItems: 1 items: type: string DeleteChatMessagesResponseData: type: object required: - deleted properties: deleted: type: boolean description: Whether the messages were deleted. PostReferencedPosts: type: array description: A list of Posts this Post refers to. If the Post is a Retweet, Quote or Reply, it includes the referenced Post's type and ID. items: type: object description: A reference from this Post to another Post (repost, quote, or reply). required: - type - id properties: id: type: string description: Unique identifier of the referenced Post. type: description: How this Post references the other Post. oneOf: - type: string description: The kind of Post-to-Post reference. enum: - retweeted - quoted - replied_to CreateChatConversationResponseData: type: object required: - conversation_id properties: conversation_id: type: string description: Canonical ID of the created conversation. conversation_key_change_sequence_id: type: string description: Sequence ID of the conversation key change. PostNotePost: type: object description: The full content of the Post, including text beyond 280 characters. required: - text properties: entities: type: - object - 'null' description: Metadata entities (hashtags, cashtags, mentions, URLs) found in the note Post text. properties: cashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string hashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string mentions: type: - array - 'null' items: type: object description: A user mention entity. required: - start - end properties: end: type: integer format: int64 id: type: - string - 'null' start: type: integer format: int64 username: type: - string - 'null' urls: type: - array - 'null' items: type: object description: A URL entity found in note Post text. required: - start - end properties: display_url: type: - string - 'null' end: type: integer format: int64 expanded_url: type: - string - 'null' start: type: integer format: int64 url: type: - string - 'null' text: type: string description: The full note text of the Post. UserId: type: string description: Unique identifier of a User pattern: ^[0-9]{1,19}$ example: '2244994945' SendChatTypingIndicatorResponse: type: object properties: data: $ref: '#/components/schemas/SendChatTypingIndicatorResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' GetChatConversationsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/ChatConversation' errors: type: array items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' meta: type: object properties: has_message_requests: type: boolean has_more: type: boolean next_token: type: string description: Pagination token for the next page of results. result_count: type: integer description: Number of items in the data array. format: int32 PostScopes: type: object description: The scopes for this Post. required: - followers properties: followers: type: boolean description: Indicates whether visibility of this Post is limited to the author's followers. DisallowedResourceProblem: type: object required: - type - title - detail properties: detail: type: string resource_id: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/disallowed-resource PostSuggestedSourceLinksWithCounts: type: array description: Suggested source URLs for this Post, each with the number of times it was suggested. items: type: object description: A suggested source URL for this Post with the number of times it was suggested. properties: count: type: - integer - 'null' description: Number of times this source link was suggested. format: int64 url: type: - string - 'null' description: The suggested source URL. AddConversationKeysActionSignatures: type: object required: - message_id - encoded_message_event_detail - message_event_signature properties: encoded_message_event_detail: type: string description: Base64-encoded message event detail. minLength: 1 pattern: ^[A-Za-z0-9+/=_-]+$ message_event_signature: description: Message event signature supplied with an action signature. $ref: '#/components/schemas/AddConversationKeysActionSignaturesMessageEventSignature' message_id: type: string description: Client-generated ID of the message being signed. minLength: 1 signature_payload: type: string description: Payload string the client signed; used only in server-side failure logs. Topic: type: object properties: description: type: string id: type: string name: type: string ChatMediaUploadFinalizeRequest: type: object required: - conversation_id - media_hash_key - num_parts properties: conversation_id: type: string description: The XChat conversation the upload belongs to. media_hash_key: type: string description: The media hash key returned by the initialize step. message_id: type: string description: Optional message identifier associated with the upload. num_parts: type: string description: Total number of uploaded parts, as a numeric string. ttl_msec: type: string description: Optional TTL for the media in milliseconds, as a numeric string. additionalProperties: false SendChatMessageResponse: type: object properties: data: $ref: '#/components/schemas/SendChatMessageResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' InitializeChatGroupResponseData: type: object required: - conversation_id properties: conversation_id: type: string description: Unique ID for the new group conversation. MarkChatConversationReadRequest: type: object required: - seen_until_sequence_id properties: seen_until_sequence_id: type: string description: The sequence ID of the last message to mark as read up to. CreateChatConversationRequest: type: object required: - conversation_id - conversation_key_version - conversation_participant_keys - group_members properties: action_signatures: type: array description: Cryptographic signatures for the action. items: $ref: '#/components/schemas/CreateChatConversationActionSignatures' base64_encoded_key_rotation: type: string description: Base64-encoded key rotation payload. conversation_id: type: string description: Client-generated conversation ID. conversation_key_version: type: string description: Version of the conversation encryption key. conversation_participant_keys: type: array description: Encrypted conversation keys for each participant. items: $ref: '#/components/schemas/CreateChatConversationConversationParticipantKeys' group_admins: type: array description: User IDs of group admins. Defaults to the creator if omitted. items: type: string group_avatar_url: type: string description: URL of the avatar image for the group conversation. group_description: type: string description: Description for the group conversation. group_members: type: array description: User IDs of group members to include in the conversation. items: type: string group_name: type: string description: Display name for the group conversation. ttl_msec: type: string description: Message time-to-live in milliseconds. Messages expire after this duration. PlaceContainedWithin: type: array description: A list of unique identifiers of the Places that contain this place. items: type: string MediaPublicMetrics: type: object description: Public engagement metrics for the media at the time of the request. required: - view_count properties: view_count: type: integer description: The number of times this video has been viewed. format: int64 PostDisplayTextRange: type: array description: The inclusive start and exclusive end indices of the displayable content of the Post. minItems: 2 maxItems: 2 items: type: integer format: int64 Expansions: type: object properties: media: type: array items: $ref: '#/components/schemas/Media' places: type: array items: $ref: '#/components/schemas/Place' polls: type: array items: $ref: '#/components/schemas/Poll' posts: type: array items: $ref: '#/components/schemas/Post' topics: type: array items: $ref: '#/components/schemas/Topic' users: type: array items: $ref: '#/components/schemas/User' AddConversationKeysRequest: type: object required: - conversation_key_version - conversation_participant_keys properties: action_signatures: type: array description: Cryptographic signatures for the action. items: $ref: '#/components/schemas/AddConversationKeysActionSignatures' base64_encoded_key_rotation: type: string description: Base64-encoded key rotation payload for ratchet tree key management. conversation_key_version: type: string description: Version of the conversation encryption key (typically a timestamp in milliseconds). conversation_participant_keys: type: array description: Encrypted conversation keys for each participant. items: $ref: '#/components/schemas/AddConversationKeysConversationParticipantKeys' PostGeo: type: object description: The location tagged on the Post, if the user provided one. properties: coordinates: type: - object - 'null' description: A GeoJSON Point geometry. required: - type - coordinates properties: coordinates: type: array description: '[longitude, latitude].' minItems: 2 maxItems: 2 items: type: number format: double type: type: string description: The GeoJSON geometry type. enum: - Point place_id: type: - string - 'null' description: The unique identifier of the tagged place. ChatMediaUploadFinalizeResponseData: type: object required: - success properties: success: type: boolean description: Whether the upload was finalized. ChatMediaUploadInitializeResponseData: type: object required: - session_id - media_hash_key - conversation_id properties: conversation_id: type: string description: Canonical ID of the conversation. media_hash_key: type: string description: Hash key addressing the uploaded media. session_id: type: string description: Upload session ID. AddUserPublicKeyRequest: type: object required: - public_key - version properties: generate_version: type: boolean description: When true, the server generates a new version. public_key: description: Public key registration payload. $ref: '#/components/schemas/AddUserPublicKeyPublicKey' version: type: string description: Public key version. PostEntities: type: object description: A list of metadata entities (hashtags, mentions, URLs) found in the Post text. properties: cashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string hashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string mentions: type: - array - 'null' items: type: object description: A user mention entity. required: - start - end properties: end: type: integer format: int64 id: type: - string - 'null' start: type: integer format: int64 username: type: - string - 'null' urls: type: - array - 'null' items: type: object description: A URL entity found in the Post text, enriched with link metadata. required: - start - end properties: description: type: - string - 'null' description: Description of the linked page, when available. display_url: type: - string - 'null' description: The URL as displayed in the Post text. end: type: integer format: int64 expanded_url: type: - string - 'null' description: The fully resolved URL. images: type: - array - 'null' items: type: object description: A preview image for a linked page. properties: height: type: - integer - 'null' format: int64 url: type: - string - 'null' width: type: - integer - 'null' format: int64 media_key: type: - string - 'null' start: type: integer format: int64 status: type: - integer - 'null' description: HTTP status from resolving the URL. format: int64 title: type: - string - 'null' description: Title of the linked page, when available. unwound_url: type: - string - 'null' description: The final destination after following redirects. url: type: - string - 'null' description: The t.co shortened URL. MediaVariants: type: array description: Each media object may have multiple display or playback variants, with different resolutions or formats. items: type: object description: A single playback or display variant of a media object. properties: bit_rate: type: - integer - 'null' description: The bit rate of this variant, in bits per second. Absent for playlist variants. format: int64 content_type: type: - string - 'null' description: The MIME type of this variant, for example "video/mp4" or "application/x-mpegURL". url: type: - string - 'null' description: The URL to this media variant. ChatConversation: type: object properties: admin_ids: type: array items: type: string created_at: type: string format: date-time group_avatar_url: type: string group_name: type: string id: type: string is_muted: type: boolean member_ids: type: array items: type: string message_ttl_ms: type: integer participant_ids: type: array items: type: string screen_capture_blocking_enabled: type: boolean screen_capture_detection_enabled: type: boolean type: type: string updated_at: type: string format: date-time ChatMediaUploadInitializeRequest: type: object required: - conversation_id - total_bytes properties: conversation_id: type: string description: The XChat conversation the upload belongs to. total_bytes: type: integer description: Total size of the media upload in bytes. minimum: 0 additionalProperties: false NotAuthorizedForFieldProblem: type: object required: - type - title - detail - field properties: detail: type: string field: type: string parameter: type: string resource_id: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/not-authorized-for-field value: type: string PostNoteRequestSuggestions: type: array description: Community-Notes request suggestions for this Post. items: type: object description: A Community-Notes request suggestion for this Post. properties: source_link: type: - string - 'null' description: A suggested source link supporting the note request. suggestion: type: - string - 'null' description: The text of the note request suggestion. suggestion_id: type: - string - 'null' description: The unique identifier of the note request suggestion. MediaPromotedMetrics: type: object description: Promoted nonpublic engagement metrics for the media at the time of the request. properties: playback_0_count: type: - integer - 'null' description: Number of users who started playback (0% quartile) of this video. format: int64 playback_100_count: type: - integer - 'null' description: Number of users who completed playback (100% quartile) of this video. format: int64 playback_25_count: type: - integer - 'null' description: Number of users who watched at least 25% of this video. format: int64 playback_50_count: type: - integer - 'null' description: Number of users who watched at least 50% of this video. format: int64 playback_75_count: type: - integer - 'null' description: Number of users who watched at least 75% of this video. format: int64 view_count: type: - integer - 'null' description: The number of promoted views of this video. Null when the backend returns quartile data without a view count. format: int64 GetChatConversationResponse: type: object properties: data: $ref: '#/components/schemas/ChatConversation' errors: type: array items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' ChatMediaUploadAppendRequest: type: object required: - media - segment_index - conversation_id - media_hash_key properties: conversation_id: type: string description: The XChat conversation the upload belongs to. media: anyOf: - type: string format: binary - type: string format: byte description: 'The media segment bytes: base64-encoded in JSON bodies, raw bytes in multipart bodies.' media_hash_key: type: string description: The media hash key returned by the initialize step. segment_index: type: integer description: The index of this segment in the upload sequence. minimum: 0 maximum: 999 additionalProperties: false AddConversationKeysActionSignaturesMessageEventSignatureMessageSigningKeyInfoList: type: object properties: member_id: type: string description: The member ID associated with this signing key. public_key_version: type: string description: The version of the public key. signing_public_key: type: string description: The signing public key. User: type: object properties: affiliation: $ref: '#/components/schemas/UserAffiliation' confirmed_email: type: string connection_status: $ref: '#/components/schemas/UserConnectionStatus' created_at: type: string description: Creation time of this User. format: date-time description: type: string description: The text of this User's profile description (also known as bio), if the User provided one. entities: $ref: '#/components/schemas/UserEntities' id: type: string description: Unique identifier of this User. is_identity_verified: type: boolean description: Indicates if this User has completed identity verification. location: type: string description: The location specified in the User's profile, if the User provided one. As this is a freeform value, it may not indicate a valid location. most_recent_post_id: type: string description: Unique identifier of this User's most recent Post. name: type: string description: The friendly name of this User, as shown on their profile. parody: type: boolean description: Indicates if this User is a parody account. pinned_post_id: type: string description: Unique identifier of this User's pinned Post. profile_banner_url: type: string description: The URL to the profile banner for this User. profile_image_url: type: string description: The URL to the profile image for this User. protected: type: boolean description: Indicates if this User has chosen to protect their Posts (in other words, if this User's Posts are private). public_metrics: $ref: '#/components/schemas/UserPublicMetrics' receives_your_dm: type: boolean description: Indicates if you can send a DM to this User. subscriber_count: type: integer description: The number of Premium subscribers of this User. subscribes_to_you: type: boolean description: Indicates if this User subscribes to you. subscription: $ref: '#/components/schemas/UserSubscription' subscription_type: type: string description: 'The X Blue subscription type of the user, e.g.: Basic, Premium, PremiumPlus or None.' url: type: string description: The URL specified in the User's profile. username: type: string description: The X handle (screen name) of this User. verified: type: boolean description: Indicates if this User is a verified X User. verified_followers_count: type: integer description: The number of verified followers of this User. verified_type: type: string description: 'The X Blue verified type of the user, e.g.: blue, government, business or none.' withheld: $ref: '#/components/schemas/UserWithheld' AddChatGroupMembersResponse: type: object properties: data: $ref: '#/components/schemas/Post' errors: type: array items: $ref: '#/components/schemas/Problem' ChatMediaUploadFinalizeResponse: type: object properties: data: $ref: '#/components/schemas/ChatMediaUploadFinalizeResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' UserPublicMetrics: type: object description: A list of metrics for this User. required: - followers_count - following_count - post_count - listed_count properties: followers_count: type: integer description: Number of Users who follow this User. format: int64 following_count: type: integer description: Number of Users this User follows. format: int64 like_count: type: - integer - 'null' description: Number of Posts this User has liked. format: int64 listed_count: type: integer description: Number of Lists that include this User. format: int64 media_count: type: - integer - 'null' description: Number of media items posted by this User. format: int64 post_count: type: integer description: Number of Posts (including Reposts) created by this User. format: int64 Place: type: object properties: contained_within: $ref: '#/components/schemas/PlaceContainedWithin' country: type: string country_code: type: string full_name: type: string geo: $ref: '#/components/schemas/PlaceGeo' id: type: string name: type: string place_type: type: string ChatMessageEvent: type: object properties: conversation_id: type: string conversation_token: type: string created_at: type: string format: date-time encoded_event: type: string id: type: string is_trusted: type: boolean message_event_signature: type: object previous_id: type: string sender_id: type: string CreateChatConversationActionSignaturesMessageEventSignature: type: object required: - signature - public_key_version - signature_version properties: message_signing_key_info_list: type: array description: List of signing key information for message verification. items: $ref: '#/components/schemas/CreateChatConversationActionSignaturesMessageEventSignatureMessageSigningKeyInfoList' public_key_version: type: string description: The version of the public key used for signing. pattern: ^[0-9]+$ signature: type: string description: The signature of the message event. minLength: 1 pattern: ^[A-Za-z0-9+/=_-]+$ signature_version: type: string description: The version of the signature algorithm. pattern: ^[0-9]+$ signing_public_key: type: string description: The public key used for signing. ChatMediaUploadAppendResponseData: type: object properties: expires_at: type: integer description: Epoch seconds when the upload session expires. AddUserPublicKeyResponseData: type: object properties: juicebox_config: type: object description: Juicebox recovery-service configuration for this key. public_key_version: type: string description: Version assigned to the registered public key. PostPublicMetrics: type: object description: Engagement metrics for the Post at the time of the request. required: - repost_count - reply_count - like_count - quote_count - bookmark_count - impression_count properties: bookmark_count: type: integer description: Number of times this Post has been bookmarked. format: int64 impression_count: type: integer description: Number of times this Post has been viewed. format: int64 like_count: type: integer description: Number of likes on this Post. format: int64 quote_count: type: integer description: Number of quote Posts of this Post. format: int64 reply_count: type: integer description: Number of replies to this Post. format: int64 repost_count: type: integer description: Number of times this Post has been reposted. format: int64 DeleteChatMessagesResponse: type: object properties: data: $ref: '#/components/schemas/DeleteChatMessagesResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' Media: type: object properties: alt_text: type: string duration_ms: type: integer height: type: integer media_key: type: string non_public_metrics: $ref: '#/components/schemas/MediaNonPublicMetrics' organic_metrics: $ref: '#/components/schemas/MediaOrganicMetrics' preview_image_url: type: string promoted_metrics: $ref: '#/components/schemas/MediaPromotedMetrics' public_metrics: $ref: '#/components/schemas/MediaPublicMetrics' type: type: string url: type: string variants: $ref: '#/components/schemas/MediaVariants' width: type: integer ChatMediaUploadInitializeResponse: type: object properties: data: $ref: '#/components/schemas/ChatMediaUploadInitializeResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' PostSuggestedSourceLinks: type: array description: URLs suggested as sources for this Post. items: type: string NotAuthorizedForResourceProblem: type: object required: - type - title - detail - resource_type properties: detail: type: string parameter: type: string resource_id: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/not-authorized-for-resource value: type: string SendChatMessageRequest: type: object required: - message_id - encoded_message_create_event properties: conversation_token: type: string description: Optional conversation token. encoded_message_create_event: type: string description: Base64-encoded Thrift MessageCreateEvent containing encrypted message contents. encoded_message_event_signature: type: string description: Base64-encoded Thrift MessageEventSignature for message verification. message_id: type: string description: Unique identifier for this message. AddConversationKeysResponse: type: object properties: data: $ref: '#/components/schemas/AddConversationKeysResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' AddChatGroupMembersRequest: type: object required: - user_ids properties: action_signatures: type: array description: Cryptographic signatures for the action. items: $ref: '#/components/schemas/AddChatGroupMembersActionSignatures' conversation_key_version: type: string description: Version of the new rotated conversation key. conversation_participant_keys: type: array description: Encrypted conversation keys for each participant. items: $ref: '#/components/schemas/AddChatGroupMembersConversationParticipantKeys' encrypted_avatar_url: type: string description: Re-encrypted group avatar URL with new conversation key. encrypted_title: type: string description: Re-encrypted group title with new conversation key. user_ids: type: array description: List of user IDs to add to the group conversation. items: type: string SendChatMessageResponseData: type: object required: - encoded_message_event properties: encoded_message_event: type: string description: Base64-encoded Thrift message event for the sent message. MediaNonPublicMetrics: type: object description: Nonpublic engagement metrics for the media at the time of the request. properties: playback_0_count: type: - integer - 'null' description: Number of users who started playback (0% quartile) of this video. format: int64 playback_100_count: type: - integer - 'null' description: Number of users who completed playback (100% quartile) of this video. format: int64 playback_25_count: type: - integer - 'null' description: Number of users who watched at least 25% of this video. format: int64 playback_50_count: type: - integer - 'null' description: Number of users who watched at least 50% of this video. format: int64 playback_75_count: type: - integer - 'null' description: Number of users who watched at least 75% of this video. format: int64 UserConnectionStatus: type: array description: Returns detailed information about the relationship between two users. items: type: string description: A connection between the authenticated User and this User. enum: - blocking - follow_request_received - follow_request_sent - followed_by - following - muting Post: type: object properties: article: type: object article_title: type: object description: Metadata about the long-form Article attached to this Post, if any. attachments: $ref: '#/components/schemas/PostAttachments' author_id: type: string description: Unique identifier of the author of this Post. card_uri: type: string community_id: type: string description: The unique identifier of the Community this Post belongs to, if any. context_annotations: $ref: '#/components/schemas/PostContextAnnotations' conversation_id: type: string description: The ID of the conversation this Post belongs to (matches the root Post's ID). created_at: type: string description: Creation time of the Post. format: date-time display_text_range: $ref: '#/components/schemas/PostDisplayTextRange' edit_controls: $ref: '#/components/schemas/PostEditControls' edit_history_post_ids: type: array description: A list of Post IDs in this Post's edit history chain. items: type: string entities: $ref: '#/components/schemas/PostEntities' geo: $ref: '#/components/schemas/PostGeo' id: type: string description: Unique identifier of this Post. in_reply_to_user_id: type: string description: Unique identifier of the User this Post is replying to. lang: type: string description: Language of the Post, if detected by X. Returned as a BCP47 language tag. matched_media_notes: $ref: '#/components/schemas/PostMatchedMediaNotes' media_metadata: $ref: '#/components/schemas/PostMediaMetadata' non_public_metrics: type: object description: Nonpublic engagement metrics for the Post at the time of the request. note_post: $ref: '#/components/schemas/PostNotePost' note_request_suggestions: $ref: '#/components/schemas/PostNoteRequestSuggestions' organic_metrics: type: object description: Organic nonpublic engagement metrics for the Post at the time of the request. paid_partnership: type: boolean description: Indicates if this Post is a paid partnership, i.e. it has been disclosed by the author as containing paid promotion. possibly_sensitive: type: boolean description: Indicates if this Post contains URLs marked as sensitive, for example content suitable for mature audiences. promoted_metrics: type: object description: Promoted nonpublic engagement metrics for the Post at the time of the request. public_metrics: $ref: '#/components/schemas/PostPublicMetrics' referenced_posts: $ref: '#/components/schemas/PostReferencedPosts' reply_settings: type: string description: Shows who can reply to this Post. scopes: $ref: '#/components/schemas/PostScopes' source: type: string description: The name of the app the user posted from. This is deprecated. suggested_source_links: $ref: '#/components/schemas/PostSuggestedSourceLinks' suggested_source_links_with_counts: $ref: '#/components/schemas/PostSuggestedSourceLinksWithCounts' text: type: string description: The content of the Post. username: type: string withheld: $ref: '#/components/schemas/PostWithheld' SendChatTypingIndicatorResponseData: type: object required: - success properties: success: type: boolean description: Whether the typing indicator was sent. InvalidRequestProblem: type: object required: - type - title - detail properties: detail: type: string parameter: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/invalid-request value: type: string PostAttachments: type: object description: Specifies the type of attachments (if any) present in this Post. properties: media_keys: type: - array - 'null' description: Media keys of media attached to this Post. items: type: string media_source_tweet_id: type: - array - 'null' description: IDs of the source Posts the attached media originated from. items: type: string poll_ids: type: - array - 'null' description: IDs of polls attached to this Post. items: type: string PostContextAnnotations: type: array description: Annotations inferred about the Post (domain and entity context). items: type: object description: A single inferred annotation about the Post (domain and entity context). required: - domain - entity properties: domain: description: The domain (broad category) this annotation belongs to. oneOf: - type: object description: A domain or entity referenced by a context annotation. properties: description: type: - string - 'null' id: type: - string - 'null' name: type: - string - 'null' entity: description: The specific entity recognized within the domain. oneOf: - type: object description: A domain or entity referenced by a context annotation. properties: description: type: - string - 'null' id: type: - string - 'null' name: type: - string - 'null' AddUserPublicKeyPublicKey: type: object properties: identity_public_key_signature: type: string description: Signature over the identity public key. public_key: type: string description: Identity public key (base64 encoded). public_key_fingerprint: type: string description: Fingerprint of the identity public key. registration_method: type: string description: Registration method for the public key. signing_public_key: type: string description: Signing public key (base64 encoded). signing_public_key_signature: type: string description: Signature over the signing public key. PollOptions: type: array description: The list of options (choices) available in this poll. items: type: object description: A single option (choice) available in a poll. required: - position - label - votes properties: label: type: string description: The text label of this poll option. position: type: integer description: The 1-based position of this option within the poll. format: int64 votes: type: integer description: The number of votes this option has received. format: int64 DeleteChatMessagesActionSignaturesMessageEventSignatureMessageSigningKeyInfoList: type: object properties: member_id: type: string description: The member ID associated with this signing key. public_key_version: type: string description: The version of the public key. signing_public_key: type: string description: The signing public key. ChatMediaUploadAppendResponse: type: object properties: data: $ref: '#/components/schemas/ChatMediaUploadAppendResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' PlaceGeo: type: object description: The geographic location of this place, expressed as a GeoJSON Feature. required: - type - bbox - properties properties: bbox: type: array description: The bounding box as [southwest_longitude, southwest_latitude, northeast_longitude, northeast_latitude]. minItems: 4 maxItems: 4 items: type: number format: double properties: type: object description: Additional GeoJSON feature properties. type: description: The GeoJSON feature type. oneOf: - type: string enum: - Feature MarkChatConversationReadResponse: type: object properties: data: $ref: '#/components/schemas/MarkChatConversationReadResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' AddChatGroupMembersActionSignaturesMessageEventSignature: type: object required: - signature - public_key_version - signature_version properties: message_signing_key_info_list: type: array description: List of signing key information for message verification. items: $ref: '#/components/schemas/AddChatGroupMembersActionSignaturesMessageEventSignatureMessageSigningKeyInfoList' public_key_version: type: string description: The version of the public key used for signing. pattern: ^[0-9]+$ signature: type: string description: The signature of the message event. minLength: 1 pattern: ^[A-Za-z0-9+/=_-]+$ signature_version: type: string description: The version of the signature algorithm. pattern: ^[0-9]+$ signing_public_key: type: string description: The public key used for signing. PostWithheld: type: object description: Withholding details for withheld content. required: - copyright - country_codes properties: copyright: type: boolean description: Indicates whether this content is withheld due to a copyright claim. country_codes: type: array description: Uppercase ISO 3166-1 alpha-2 country codes where this content is withheld. items: type: string scope: type: - string - 'null' description: Whether the withholding applies to a Post or a User. enum: - post - user MediaOrganicMetrics: type: object description: Organic nonpublic engagement metrics for the media at the time of the request. properties: playback_0_count: type: - integer - 'null' description: Number of users who started playback (0% quartile) of this video. format: int64 playback_100_count: type: - integer - 'null' description: Number of users who completed playback (100% quartile) of this video. format: int64 playback_25_count: type: - integer - 'null' description: Number of users who watched at least 25% of this video. format: int64 playback_50_count: type: - integer - 'null' description: Number of users who watched at least 50% of this video. format: int64 playback_75_count: type: - integer - 'null' description: Number of users who watched at least 75% of this video. format: int64 view_count: type: - integer - 'null' description: The number of organic views of this video. Null when the backend returns quartile data without a view count. format: int64 CreateChatConversationResponse: type: object properties: data: $ref: '#/components/schemas/CreateChatConversationResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' ResourceNotFoundProblem: type: object required: - type - title - detail - resource_type properties: detail: type: string parameter: type: string resource_id: type: string resource_type: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/resource-not-found value: type: string PostMatchedMediaNotes: type: array description: Community-Notes media matches for this Post. items: type: object description: A Community-Notes media match for this Post. properties: match_status: type: - string - 'null' description: The status of the media note match. note_id: type: - string - 'null' description: The matched note's unique identifier. AddChatGroupMembersActionSignatures: type: object required: - message_id - encoded_message_event_detail - message_event_signature properties: encoded_message_event_detail: type: string description: Base64-encoded message event detail. minLength: 1 pattern: ^[A-Za-z0-9+/=_-]+$ message_event_signature: description: Message event signature supplied with an action signature. $ref: '#/components/schemas/AddChatGroupMembersActionSignaturesMessageEventSignature' message_id: type: string description: Client-generated ID of the message being signed. minLength: 1 signature_payload: type: string description: Payload string the client signed; used only in server-side failure logs. FieldUnauthorizedProblem: type: object required: - type - title - detail - field properties: detail: type: string field: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/field-unauthorized parameters: ChatMessageEventFieldsParameter: name: chat_message_event.fields in: query description: A comma separated list of ChatMessageEvent fields to display. required: false schema: type: array description: The fields available for a ChatMessageEvent object. minItems: 1 uniqueItems: true items: type: string enum: - conversation_id - conversation_token - created_at - encoded_event - id - is_trusted - message_event_signature - previous_id - sender_id explode: false style: form ChatConversationFieldsParameter: name: chat_conversation.fields in: query description: A comma separated list of ChatConversation fields to display. required: false schema: type: array description: The fields available for a ChatConversation object. minItems: 1 uniqueItems: true items: type: string enum: - created_at - group_avatar_url - group_name - id - is_muted - message_ttl_ms - screen_capture_blocking_enabled - screen_capture_detection_enabled - type - updated_at explode: false style: form UserFieldsParameter: name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array description: The fields available for a User object. minItems: 1 uniqueItems: true items: type: string enum: - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - name - parody - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscriber_count - subscribes_to_you - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form ChatConversationExpansionsParameter: name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - admin_ids - member_ids - participant_ids explode: false style: form 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. block.write: Block and unblock accounts on your behalf. bookmark.read: Read your bookmarked Posts. bookmark.write: Create and delete your bookmarks. broadcast.read: View your live broadcasts and their chat. broadcast.write: Manage your live broadcasts and send chat messages on your behalf. developer.read: View your developer accounts, apps, and settings. developer.write: Create and manage your X Developer Platform account. 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. 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: Create and repost on your behalf. users.read: View any account you can see, including protected accounts. UserToken: type: http scheme: OAuth