cURL
curl --request POST \ --url https://api.x.com/2/dm_conversations/with/{participant_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 participant by their ID.
1
Show child attributes