cURL
curl --request POST \ --url https://api.x.com/2/dm_conversations/{dm_conversation_id}/messages \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "attachments": [ { "media_id": "1146654567674912769" } ], "text": "<string>" }'
{ "data": { "dm_conversation_id": "123123123-456456456", "dm_event_id": "1146654567674912769" }, "errors": [ { "detail": "<string>", "status": 123, "title": "<string>", "type": "<string>" } ] }
Sends a new direct message to a specific conversation by its ID.
The access token received from the authorization server in the OAuth 2.0 flow.
The DM Conversation ID.
The request has succeeded.
The response is of type object.
object