Skip to main content
GET
/
api
/
dms
/
{channelID}
/
messages
List DM messages
curl --request GET \
  --url http://localhost:8091/api/dms/{channelID}/messages \
  --header 'Authorization: Bearer <token>'
{
  "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

Query Parameters

before
string

Cursor: return messages before this message ID

limit
integer
default:50

Maximum number of messages to return

Response

DM messages list

data
object[]