Skip to main content
POST
Send Chat Message

Authorizations

Authorization
string
header
required

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

FlowAuthorization Code
Authorization URL
https://api.x.com/2/oauth2/authorize
Token URL
https://api.x.com/2/oauth2/token
Scopes3
dm.write
Send and manage your Direct Messages.
tweet.read
View all posts you can see, including those from protected accounts.
users.read
View any account you can see, including protected accounts.

Path Parameters

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

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[]