Skip to main content
POST
/
2
/
chat
/
conversations
/
{id}
/
members
Add members to a Chat group conversation
curl --request POST \
  --url https://api.x.com/2/chat/conversations/{id}/members \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_ids": [
    "<string>"
  ],
  "action_signatures": [
    {
      "encoded_message_event_detail": "<string>",
      "message_event_signature": {
        "message_signing_key_info_list": [
          {
            "member_id": "<string>",
            "public_key_version": "<string>",
            "signing_public_key": "<string>"
          }
        ],
        "public_key_version": "<string>",
        "signature": "<string>",
        "signature_version": "<string>",
        "signing_public_key": "<string>"
      },
      "message_id": "<string>",
      "signature_payload": "<string>"
    }
  ],
  "conversation_key_version": "<string>",
  "conversation_participant_keys": [
    {
      "encrypted_conversation_key": "<string>",
      "public_key_version": "<string>",
      "user_id": "<string>"
    }
  ],
  "encrypted_avatar_url": "<string>",
  "encrypted_title": "<string>"
}
'
{
  "conversation_key_change_sequence_id": "<string>",
  "current_member_ids": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string
required

The Chat group conversation ID. Identifies the conversation target. Accepts three formats: (1) a recipient user ID for 1:1 conversations (e.g., '1215441834412953600'), (2) a legacy 1:1 conversation ID with two user IDs separated by a dash (e.g., '1215441834412953600-1603419180975409153'), or (3) a group conversation ID prefixed with 'g' (e.g., 'g1234567890123456789'). The server constructs the canonical conversation ID from the authenticated user and recipient when a single user ID is provided.

Pattern: ^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$
Example:

"1215441834412953600"

Body

application/json
user_ids
string[]
required

List of user IDs to add to the group conversation.

User ID to add.

action_signatures
object[]

Cryptographic signatures for the add-members action.

conversation_key_version
string

Version of the new rotated conversation key.

conversation_participant_keys
object[]

Encrypted conversation keys for each new participant after key rotation.

encrypted_avatar_url
string

Re-encrypted group avatar URL with new conversation key.

encrypted_title
string

Re-encrypted group title with new conversation key.

Response

The request has succeeded.

conversation_key_change_sequence_id
string

Sequence ID of the conversation key change event.

current_member_ids
string[]

List of all current member IDs in the conversation.

User ID.