curl --request POST \
--url http://localhost:8091/api/dms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>"
}
'{
"data": {
"channel": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"topic": "<string>",
"isDm": true,
"isPrivate": true,
"archived": true,
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"position": 123,
"serverId": "<string>",
"memberCount": 123,
"groupId": "<string>"
},
"otherUser": {
"id": "<string>",
"username": "<string>",
"displayName": "<string>",
"status": "<string>",
"bot": true,
"createdAt": "2023-11-07T05:31:56Z",
"avatarPath": "<string>"
},
"lastMessage": {
"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"
}
]
}
}
}Opens a direct message conversation with another user. If a DM channel already exists between the two users, it is returned. Otherwise, a new DM channel is created.
curl --request POST \
--url http://localhost:8091/api/dms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>"
}
'{
"data": {
"channel": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"topic": "<string>",
"isDm": true,
"isPrivate": true,
"archived": true,
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"position": 123,
"serverId": "<string>",
"memberCount": 123,
"groupId": "<string>"
},
"otherUser": {
"id": "<string>",
"username": "<string>",
"displayName": "<string>",
"status": "<string>",
"bot": true,
"createdAt": "2023-11-07T05:31:56Z",
"avatarPath": "<string>"
},
"lastMessage": {
"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"
}
]
}
}
}