POST /discord/dms

A 1:1 DM from the bot to a user it shares a server with (by snowflake id; Discord answers 403 when the user accepts no DMs). Sent now, not stored; replies never arrive

POST
/discord/dms

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Request Body

application/json
  1. body
accountId*string
userId*string

15-21 digits

content?string
Lengthlength <= 2000
embeds?array<>
Itemsitems <= 10
attachments?array<>
Itemsitems <= 10
tts?boolean

Response Body

DM sent

application/json
  1. response
messageId?string
channelId?string

DM channel id

url?string
timestamp?string
Formatdate-time
recipient?
account?
Example Request
curl -X POST 'https://example.com/api/v1/discord/dms' \  -H 'Content-Type: application/json' \  -d '{  "accountId": "string",  "userId": "string"}'
Example Response
{  "messageId": "string",  "channelId": "string",  "url": "string",  "timestamp": "2019-08-24T14:15:22Z",  "recipient": {    "userId": "string",    "platform": "string"  },  "account": {    "id": "string",    "username": "string",    "displayName": "string"  }}