> ## Documentation Index
> Fetch the complete documentation index at: https://generaltranslation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# डायरेक्ट मैसेज प्रबंधित करें

> डायरेक्ट मैसेज भेजें और हटाएँ

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

Manage डायरेक्ट मैसेज एंडपॉइंट्स आपको प्रमाणित उपयोगकर्ताओं की ओर से डायरेक्ट मैसेज भेजने और हटाने की सुविधा देते हैं।

<div id="overview">
  ## अवलोकन
</div>

<CardGroup cols={2}>
  <Card title="संदेश भेजें" icon="paper-plane">
    किसी दूसरे उपयोगकर्ता को DM भेजें
  </Card>

  <Card title="संदेश हटाएँ" icon="trash">
    अपने लिए DM हटाएँ
  </Card>

  <Card title="वार्तालाप बनाएँ" icon="comments">
    नया वार्तालाप शुरू करें
  </Card>

  <Card title="समूह संदेश" icon="users">
    समूह वार्तालापों में संदेश भेजें
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## एंडपॉइंट्स
</div>

| Method | Endpoint                                            | Description                  |
| :----- | :-------------------------------------------------- | :--------------------------- |
| POST   | `/2/dm_conversations`                               | नया वार्तालाप बनाएँ          |
| POST   | `/2/dm_conversations/with/:participant_id/messages` | एक-से-एक वार्तालाप में भेजें |
| POST   | `/2/dm_conversations/:dm_conversation_id/messages`  | मौजूदा वार्तालाप में भेजें   |
| DELETE | `/2/dm_events/:id`                                  | DM इवेंट हटाएँ               |

***

<div id="example-send-a-message">
  ## उदाहरण: संदेश भेजें
</div>

```bash theme={null}
curl -X POST "https://api.x.com/2/dm_conversations/with/1234567890/messages" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello! How are you?"}'
```

<div id="example-response">
  ## उदाहरण प्रतिक्रिया
</div>

```json theme={null}
{
  "data": {
    "dm_conversation_id": "1234567890-0987654321",
    "dm_event_id": "1122334455667788990"
  }
}
```

***

<div id="message-types">
  ## संदेशों के प्रकार
</div>

आप टेक्स्ट संदेश भेज सकते हैं और मीडिया संलग्न कर सकते हैं:

```json theme={null}
{
  "text": "Check out this photo!",
  "attachments": [{
    "media_id": "1234567890123456789"
  }]
}
```

***

<div id="getting-started">
  ## शुरुआत करें
</div>

<Note>
  **पूर्वापेक्षाएँ**

  * एक स्वीकृत [डेवलपर खाता](https://developer.x.com/en/portal/petition/essential/basic-info)
  * डेवलपर कंसोल में एक [Project और ऐप](/hi/resources/fundamentals/developer-apps)
  * [OAuth 2.0 PKCE](/hi/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2) के माध्यम से User Access Tokens
</Note>

<CardGroup cols={2}>
  <Card title="त्वरित शुरुआत" icon="rocket" href="/hi/x-api/direct-messages/manage/quickstart">
    अपना पहला DM भेजें
  </Card>

  <Card title="एकीकरण मार्गदर्शिका" icon="book" href="/hi/x-api/direct-messages/manage/integrate">
    मुख्य अवधारणाएँ और सर्वोत्तम प्रथाएँ
  </Card>

  <Card title="DM लुकअप" icon="messages" href="/hi/x-api/direct-messages/lookup/introduction">
    DM इवेंट प्राप्त करें
  </Card>

  <Card title="API संदर्भ" icon="code" href="/hi/x-api/direct-messages/send-new-message">
    एंडपॉइंट का पूरा दस्तावेज़ीकरण
  </Card>
</CardGroup>
