curl --request POST \
--url https://api.x.com/2/dm_conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"conversation_type": "Group",
"message": {
"attachments": [
{
"media_id": "1146654567674912769"
}
],
"text": "<string>"
},
"participant_ids": [
"2244994945"
]
}'
{
"data": {
"dm_conversation_id": "123123123-456456456",
"dm_event_id": "1146654567674912769"
},
"errors": [
{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}
]
}
Initiates a new direct message conversation with specified participants.
curl --request POST \
--url https://api.x.com/2/dm_conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"conversation_type": "Group",
"message": {
"attachments": [
{
"media_id": "1146654567674912769"
}
],
"text": "<string>"
},
"participant_ids": [
"2244994945"
]
}'
{
"data": {
"dm_conversation_id": "123123123-456456456",
"dm_event_id": "1146654567674912769"
},
"errors": [
{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}
]
}
The access token received from the authorization server in the OAuth 2.0 flow.
The request has succeeded.
The response is of type object
.