Skip to main content
POST
/
2
/
chat
/
conversations
/
{conversation_id}
/
messages
Send Chat Message
curl --request POST \
  --url https://api.x.com/2/chat/conversations/{conversation_id}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "encoded_message_create_event": "<string>",
  "message_id": "<string>",
  "conversation_token": "<string>",
  "encoded_message_event_signature": "<string>"
}
'
{
  "data": {
    "encoded_message_event": "<string>"
  },
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

conversation_id
string
required

The Chat conversation ID. Unique identifier of an Chat conversation. Format is either two user IDs separated by a hyphen (e.g., '1215441834412953600-1603419180975409153') for direct conversations, or 'g' followed by a numeric ID (e.g., 'g1234567890123456789') for group conversations.

Example:

"1215441834412953600-1603419180975409153"

Body

application/json
encoded_message_create_event
string
required

Base64-encoded Thrift MessageCreateEvent containing encrypted message contents.

message_id
string
required

Unique identifier for this message.

conversation_token
string

Optional conversation token.

encoded_message_event_signature
string

Base64-encoded Thrift MessageEventSignature for message verification.

Response

The request has succeeded.

data
object
errors
object[]
Minimum array length: 1