Skip to main content
POST
/
api
/
dms
/
{channelID}
/
messages
Send DM message
curl --request POST \
  --url http://localhost:8091/api/dms/{channelID}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "threadId": "<string>",
  "attachmentIds": [
    "<string>"
  ]
}
'
{
  "data": {
    "id": "<string>",
    "channelId": "<string>",
    "userId": "<string>",
    "content": "<string>",
    "edited": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "threadId": "<string>",
    "user": {
      "id": "<string>",
      "username": "<string>",
      "displayName": "<string>",
      "status": "<string>",
      "bot": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "avatarPath": "<string>"
    },
    "replyCount": 123,
    "reactions": [
      {
        "emoji": "<string>",
        "count": 123,
        "users": [
          "<string>"
        ]
      }
    ],
    "attachments": [
      {
        "id": "<string>",
        "messageId": "<string>",
        "filename": "<string>",
        "storedPath": "<string>",
        "mimeType": "<string>",
        "sizeBytes": 123,
        "createdAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Session token obtained from /api/auth/login or /api/auth/register. Pass as: Authorization: Bearer

Path Parameters

channelID
string
required

Channel ID

Body

application/json
content
string
required

Message text content

threadId
string

Parent message ID to create a thread reply

attachmentIds
string[]

IDs of previously uploaded attachments to include

Response

Message sent

data
object