Skip to main content
POST
/
users
/
@me
/
channels
cURL
curl --request POST \
  --url https://discord.com/api/v10/users/@me/channels \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "recipient_id": "<unknown>",
  "access_tokens": [
    "<string>"
  ],
  "nicks": {}
}
'
{
  "id": "<string>",
  "type": 1,
  "flags": 123,
  "recipients": [
    {
      "id": "<string>",
      "username": "<string>",
      "avatar": "<string>",
      "discriminator": "<string>",
      "public_flags": 123,
      "flags": 0,
      "global_name": "<string>",
      "primary_guild": "<unknown>",
      "bot": true,
      "system": true,
      "banner": "<string>",
      "accent_color": 123,
      "avatar_decoration_data": "<unknown>",
      "collectibles": "<unknown>"
    }
  ],
  "last_message_id": "<unknown>",
  "last_pin_timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Discord bot token

Body

application/json
recipient_id
null | string<snowflake>
access_tokens
string[] | null
Maximum array length: 1521
Maximum string length: 152133
nicks
object

Response

200 response for create_dm

id
string<snowflake>
required
type
enum<integer>
required

A direct message between users

Available options:
1
flags
integer<int32>
required
recipients
object[]
required
last_message_id
null | string<snowflake>
last_pin_timestamp
string<date-time> | null