title: Use Discord API to send a private message given a user ID
body: <p>I have been attempting to use <a href="https://discord.com/developers/docs/intro" rel="nofollow noreferrer">Discord's API</a> to send a new private message to a user, given their user ID.</p>
  <p>I am aware this is possible using libraries such as Discord.JS and Discord.py - please do not recommend me to use those, I am quite aware of what I am wanting to do. I've tried looking at the source for libraries like Discord.js but can't seem to find the endpoint needed to create a new DM with the specific user.</p>
  <p>In addition, Discord's documentation are unclear on the topic and research online is broad.</p>
  <p>Here is my current code(which obviously won't work as the endpoint isn't correct):</p>
  <pre><code>const discordToken = &quot;some-token&quot;;
  const discordID = &quot;some-user-id&quot;;
  const userURL = `https://discordapp.com/api/users/${discordID}`;
      fetch(userURL, {
          method: 'POST',
          body: JSON.stringify({
              recipent_id: discordID,
              embed: {
                title: `Testing - Title `,
                description: `Testing - Description`
              }
          }), 
          headers: {
              'Content-Type': 'application/json',
              'Authorization': 'Bot ' + discordToken
            },
      })
  </code></pre>
  <p>If anyone knows the proper endpoint or another way to achieve this(using purely POST requests, no external libraries), please let me know, thanks.</p>