मुख्य सामग्री पर जाएं
POST
/
2
/
dm_conversations
DM वार्तालाप बनाएँ
curl --request POST \
  --url https://api.x.com/2/dm_conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": {
    "text": "<string>",
    "attachments": [
      {
        "media_id": "1146654567674912769"
      }
    ]
  },
  "participant_ids": [
    "2244994945"
  ]
}
'
{
  "data": {
    "dm_conversation_id": "123123123-456456456",
    "dm_event_id": "1146654567674912769"
  },
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

प्राधिकरण

Authorization
string
header
आवश्यक

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

बॉडी

application/json
conversation_type
enum<string>
आवश्यक

बनाए जा रहे conversation का type।

उपलब्ध विकल्प:
Group
message
object
आवश्यक
participant_ids
string[]
आवश्यक

DM बातचीत के प्रतिभागी।

Required array length: 2 - 49 elements

इस उपयोगकर्ता का विशिष्ट पहचानकर्ता। इसे स्ट्रिंग के रूप में लौटाया जाता है, ताकि उन भाषाओं और टूल्स से जुड़ी जटिलताओं से बचा जा सके जो बड़े पूर्णांकों को संभाल नहीं सकते।

Pattern: ^[0-9]{1,19}$

प्रतिक्रिया

अनुरोध सफल रहा।

data
object
errors
object[]
Minimum array length: 1

IETF RFC 7807 (https://tools.ietf.org/html/rfc7807) में परिभाषित एक HTTP Problem Details ऑब्जेक्ट।