Twitter/X Chat API
The Chat API from Twitter/X — 16 operation(s) for chat.
The Chat API from Twitter/X — 16 operation(s) for chat.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/twitter-x-chat-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
description: X API v2 available endpoints
version: '2.166'
title: X API v2 Account Activity 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
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
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, the hyphen-separated 1:1 conversation ID (e.g. '123-456'), 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: 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).
**Workflow (new 1:1 conversation):**
1. Generate a conversation key using the SDK
2. Encrypt the key for both participants using their public keys
3. Call this endpoint to register the keys
4. Send messages using `POST /chat/conversations/{id}/messages`
To rotate the keys of an existing conversation, repeat the same call with a
newer conversation key version.
**Authentication:**
- Requires OAuth 1.0a User Context or OAuth 2.0 User Context
- Required scopes: `tweet.read`, `users.read`, `dm.write`
'
externalDocs:
url: https://developer.x.com/
operationId: addConversationKeys
parameters:
- name: id
in: path
description: The recipient's user ID for a 1:1 conversation, the hyphen-separated 1:1 conversation ID (e.g. '123-456'), 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 (prefixed with 'g').
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, the hyphen-separated 1:1 conversation ID (e.g. '123-456'), 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, the hyphen-separated 1:1 conversation ID (e.g. '123-456'), 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, the hyphen-separated 1:1 conversation ID (e.g. '123-456'), 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, the hyphen-separated 1:1 conversation ID (e.g. '123-456'), 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/users/public_keys:
get:
security:
- OAuth2UserToken:
- dm.read
- tweet.read
- users.read
- UserToken: []
tags:
- 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/{id}/public_keys:
get:
security:
- OAuth2UserToken:
- dm.read
- tweet.read
- users.read
- UserToken: []
tags:
- 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'
components:
schemas:
PollOption:
type: object
description: Describes a choice in a Poll object.
required:
- position
- label
- votes
properties:
label:
$ref: '#/components/schemas/PollOptionLabel'
position:
type: integer
description: Position of this choice in the poll.
votes:
type: integer
description: Number of users who voted for this choice.
PlaceId:
type: string
description: The identifier for this place.
example: f7eb2fa2fea288b1
ChatMessageEvent:
type: object
description: An Chat message event with extracted envelope fields and the original encoded event.
required:
- encoded_event
properties:
conversation_id:
type: string
description: 'The conversation ID this message belongs to, in the form embedded in events: the colon-separated participant pair for a 1:1 conversation (e.g. ''123:456''), or a ''g''-prefixed ID for a group.'
conversation_token:
type: string
description: The conversation token for this message.
created_at_msec:
type: string
description: The creation timestamp in milliseconds.
encoded_event:
type: string
description: Base64-encoded MessageEvent for client decoding.
id:
type: string
description: The unique identifier for this message event (message_id).
is_trusted:
type: boolean
description: Whether the message is from a trusted source.
message_event_signature:
$ref: '#/components/schemas/ChatMessageEventSignature'
previous_sequence_id:
type: string
description: The sequence ID of the previous message.
sender_id:
type: string
description: The user ID of the message sender.
sequence_id:
type: string
description: The sequence identifier for ordering messages.
ChatCreateConversationResponse:
type: object
properties:
data:
type: object
properties:
conversation_id:
type: string
description: The ID of the created group conversation (prefixed with 'g').
conversation_key_change_sequence_id:
type: string
description: Sequence ID of the conversation key change event, if applicable.
errors:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Problem'
Problem:
type: object
description: An HTTP Problem Details object, as defined in IETF RFC 7807 (https://tools.ietf.org/html/rfc7807).
required:
- type
- title
properties:
detail:
type: string
status:
type: integer
title:
type: string
type:
type: string
discriminator:
propertyName: type
mapping:
about:blank: '#/components/schemas/GenericProblem'
https://api.twitter.com/2/problems/client-disconnected: '#/components/schemas/ClientDisconnectedProblem'
https://api.twitter.com/2/problems/client-forbidden: '#/components/schemas/ClientForbiddenProblem'
https://api.twitter.com/2/problems/conflict: '#/components/schemas/ConflictProblem'
https://api.twitter.com/2/problems/disallowed-resource: '#/components/schemas/DisallowedResourceProblem'
https://api.twitter.com/2/problems/duplicate-rules: '#/components/schemas/DuplicateRuleProblem'
https://api.twitter.com/2/problems/invalid-request: '#/components/schemas/InvalidRequestProblem'
https://api.twitter.com/2/problems/invalid-rules: '#/components/schemas/InvalidRuleProblem'
https://api.twitter.com/2/problems/noncompliant-rules: '#/components/schemas/NonCompliantRulesProblem'
https://api.twitter.com/2/problems/not-authorized-for-field: '#/components/schemas/FieldUnauthorizedProblem'
https://api.twitter.com/2/problems/not-authorized-for-resource: '#/components/schemas/ResourceUnauthorizedProblem'
https://api.twitter.com/2/problems/operational-disconnect: '#/components/schemas/OperationalDisconnectProblem'
https://api.twitter.com/2/problems/resource-not-found: '#/components/schemas/ResourceNotFoundProblem'
https://api.twitter.com/2/problems/resource-unavailable: '#/components/schemas/ResourceUnavailableProblem'
https://api.twitter.com/2/problems/rule-cap: '#/components/schemas/RulesCapProblem'
https://api.twitter.com/2/problems/streaming-connection: '#/components/schemas/ConnectionExceptionProblem'
https://api.twitter.com/2/problems/unsupported-authentication: '#/components/schemas/UnsupportedAuthenticationProblem'
https://api.twitter.com/2/problems/usage-capped: '#/components/schemas/UsageCapExceededProblem'
Get2UsersPublicKeysResponse:
type: object
properties:
data:
$ref: '#/components/schemas/PublicKey'
errors:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Problem'
ChatAddGroupMembersResponse:
type: object
properties:
conversation_key_change_sequence_id:
type: string
description: Sequence ID of the conversation key change event.
current_member_ids:
type: array
description: List of all current member IDs in the conversation.
items:
type: string
description: User ID.
ChatInitializeGroupResponse:
type: object
properties:
data:
type: object
properties:
conversation_id:
type: string
description: The unique identifier for the initialized group conversation. This ID is prefixed with 'g' (e.g., 'g123
# --- truncated at 32 KB (94 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/twitter-x/refs/heads/main/openapi/twitter-x-chat-api-openapi.yml