X (Twitter) Chat API

The Chat API from X (Twitter) — 15 operation(s) for chat.

OpenAPI Specification

twitter-chat-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: X API v2 available endpoints
  version: '2.161'
  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: X 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
        example: 10
      - name: pagination_token
        in: query
        description: Token for pagination to retrieve the next page of results.
        required: false
        schema:
          type: string
        style: form
        example: next_token_abc123
      - $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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/conversations/group:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X 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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/conversations/group/initialize:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
      - UserToken: []
      tags:
      - Chat
      summary: X 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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/conversations/{id}:
    get:
      security:
      - OAuth2UserToken:
        - dm.read
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X Get Chat Conversation
      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: getChatConversation
      parameters:
      - name: id
        in: path
        description: The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').
        required: true
        schema:
          $ref: '#/components/schemas/ChatConversationOrRecipientId'
        style: simple
        example: '1234567890'
      - 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
        example: 10
      - name: pagination_token
        in: query
        description: Token for pagination to retrieve the next page of results.
        required: false
        schema:
          type: string
        style: form
        example: next_token_abc123
      - $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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/conversations/{id}/keys:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X Initialize Conversation Keys
      description: 'Initializes encryption keys for a Chat conversation. This is the first step

        before sending messages in a new 1:1 conversation.


        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 (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`


        **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: initializeChatConversationKeys
      parameters:
      - name: id
        in: path
        description: The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').
        required: true
        schema:
          $ref: '#/components/schemas/ChatConversationOrRecipientId'
        style: simple
        example: '1234567890'
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/conversations/{id}/members:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X Add Members to a Chat Group Conversation
      description: Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key.
      externalDocs:
        url: https://developer.x.com/
      operationId: addChatGroupMembers
      parameters:
      - name: id
        in: path
        description: The Chat group conversation ID.
        required: true
        schema:
          $ref: '#/components/schemas/ChatConversationOrRecipientId'
        style: simple
        example: '1234567890'
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/conversations/{id}/messages:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X Send Chat Message
      description: Sends an encrypted message to a specific Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
      externalDocs:
        url: https://developer.x.com/
      operationId: sendChatMessage
      parameters:
      - name: id
        in: path
        description: The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').
        required: true
        schema:
          $ref: '#/components/schemas/ChatConversationOrRecipientId'
        style: simple
        example: '1234567890'
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/conversations/{id}/read:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X Mark Conversation as Read
      description: Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
      externalDocs:
        url: https://developer.x.com/
      operationId: markChatConversationRead
      parameters:
      - name: id
        in: path
        description: The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').
        required: true
        schema:
          $ref: '#/components/schemas/ChatConversationOrRecipientId'
        style: simple
        example: '1234567890'
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/conversations/{id}/typing:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X Send Typing Indicator
      description: Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
      externalDocs:
        url: https://developer.x.com/
      operationId: sendChatTypingIndicator
      parameters:
      - name: id
        in: path
        description: The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').
        required: true
        schema:
          $ref: '#/components/schemas/ChatConversationOrRecipientId'
        style: simple
        example: '1234567890'
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/media/upload/initialize:
    post:
      security:
      - OAuth2UserToken:
        - media.write
      - UserToken: []
      tags:
      - Chat
      summary: X 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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/media/upload/{id}/append:
    post:
      security:
      - OAuth2UserToken:
        - media.write
      - UserToken: []
      tags:
      - Chat
      summary: X 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
        example: '1234567890'
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/media/upload/{id}/finalize:
    post:
      security:
      - OAuth2UserToken:
        - media.write
      - UserToken: []
      tags:
      - Chat
      summary: X 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
        example: '1234567890'
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/chat/media/{id}/{media_hash_key}:
    get:
      security:
      - OAuth2UserToken:
        - media.write
      - UserToken: []
      tags:
      - Chat
      summary: X Download Chat Media
      description: Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
      externalDocs:
        url: https://developer.x.com/
      operationId: chatMediaDownload
      parameters:
      - name: id
        in: path
        description: The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g').
        required: true
        schema:
          $ref: '#/components/schemas/ChatConversationOrRecipientId'
        style: simple
        example: '1234567890'
      - 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
        example: example_value
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/users/public_keys:
    get:
      security:
      - OAuth2UserToken:
        - dm.read
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X 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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/users/{id}/public_keys:
    get:
      security:
      - OAuth2UserToken:
        - dm.read
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X 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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Chat
      summary: X 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
        example: '1234567890'
      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'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    PollId:
      type: string
      description: Unique identifier of this poll.
      pattern: ^[0-9]{1,19}$
      example: '1365059861688410112'
    Media:
      type: object
      required:
      - type
      properties:
        height:
          $ref: '#/components/schemas/MediaHeight'
        media_key:
          $ref: '#/components/schemas/MediaKey'
        type:
          type: string
        width:
          $ref: '#/components/schemas/MediaWidth'
      discriminator:
        propertyName: type
        mapping:
          animated_gif: '#/components/schemas/AnimatedGif'
          photo: '#/components/schemas/Photo'
          video: '#/components/schemas/Video'
    ChatAddPublicKeyResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ChatPublicKey'
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Problem'
          example: []
    Geo:
      type: object
      required:
      - type
      - bbox
      - properties
      properties:
        bbox:
          type: array
          minItems: 4
          maxItems: 4
          items:
            type: number
            minimum: -180
            maximum: 180
            format: double
          example:
          - -105.193475
          - 39.60973
          - -105.053164
          - 39.761974
        geometry:
          $ref: '#/components/schemas/Point'
        properties:
          type: object
        type:
          type: string
          enum:
          - Feature
    PlaceId:
      type: string
      description: The identifier for this place.
      example: f7eb2fa2fea288b1
    ContextAnnotationDomainFields:
      type: object
      description: Represents the data for the context annotation domain.
      required:
      - id
      properties:
        description:
          type: string
          description: Description of the context annotation domain.
          example: Example description for this resource.
        id:
          type: string
          description: The unique id for a context annotation domain.
          pattern: ^[0-9]{1,19}$
          example: '1234567890'
        name:
          type: string
          description: Name of the context annotation domain.
          example: Example User
    MentionFields:
      type: object
      description: Represent the portion of text recognized as a User mention, and its start and end position within the text.
      required:
      - username
      properties:
        id:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/UserName'
    HashtagEntity:
      allOf:
      - $ref: '#/components/schemas/EntityIndicesInclusiveExclusive'
      - $ref: '#/components/schemas/HashtagFields'
    ChatGetConversationResponse:
      type: object
      properties:
        data:
          type: array
          description: List of message events in the conversation.
          items:
            $ref: '#/components/schemas/ChatMessageEvent'
          example: []
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Problem'
          example: []
        meta:
          type: object
          properties:
            conversation_key_events:
              type: array
              description: Conversation key change events needed for decryption.
              items:
                type: string
            has_more:
              type: boolean
              description: Whether there are more messages to fetch.
            next_token:
              type: string
              description: Token to retrieve the next page of results.
            result_count:
              type: integer
              description: The number of message events returned.
    Get2UsersPublicKeysResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PublicKey'
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Problem'
    ReplySettingsWithVerifiedUsers:
      type: string
      description: Shows who can reply a Tweet. Fields returned are everyone, mentioned_users, subscribers, verified and following.
      pattern: ^[A-Za-z]{1,12}$
      enum:
      - everyone
      - mentionedUsers
      - following
      - other
      - subscribers
      - verified
    Topic:
      type: object
      description: The topic of a Space, as selected by its creator.
      required:
      - id
      - name
      properties:
        description:
          type: string
          description: The description of the given topic.
          example: All about technology
        id:
          $ref: '#/components/schemas/TopicId'
        name:
          type: string
          description: The name of the given topic.
          example: Technology
    ChatAddGroupMembersRequest:
      type: object
      required:
      - user_ids
      properties:
        action_signatures:
          type: array
          description: Cryptographic signatures for the add-members action.
          items:
            $ref: '#/components/schemas/ChatActionSignature'
          example: []
        conversation_key_version:
          type: string
          description: Version of the new rotated conversation key.
          example: example_value
        conversation_participant_keys:
          type: array
          description: Encrypted conversation keys for each new participant after key rotation.
          items:
            $ref: '#/components/schemas/ChatConversationParticipantKey'
          example: []
        encrypted_avatar_url:
          type: string
          description: Re-encrypted group avatar URL with new conversation key.
          example: https://x.com/exampleuser
        encrypted_title:
          type: string
          description: Re-encrypted group title with new conversation key.
          example: Example Title
        user_ids:
          type: array
          description: List of user IDs to add to the group conversation.
          items:
            type: string
            description: User ID to add.
          example:
          - '1234567890'
    MediaHashKey:
      type: string
      description: The media hash key returned from the upload initialize step. Alphanumeric characters only.
      pattern: ^[a-zA-Z0-9]{1,50}$
      example: AGgkIbPRTG
    Place:
      type: object
      required:
      - id
      - full_name
      properties:
        contained_within:
          type: array
          minItems: 1
    

# --- truncated at 32 KB (95 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/twitter/refs/heads/main/openapi/twitter-chat-api-openapi.yml