List DMs
- Print
- DarkLight
- PDF
List DMs
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Get
/api/v1/im.list
List all the DMs of the authenticated user.
Change Log
Version | Description |
---|---|
0.67.0 | Remove query parameter support. |
0.62.0 | Add query parameter support. |
0.49.0 | Count and offset query parameters supported. |
0.48.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authToken
of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId
of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Query parameters
offset
integer
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items.
Example50
count
integer
The number of items to return.
Example50
sort
List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, { "value": -1, "_id": 1 }
Responses
200
OK
Example 1
{
"ims": [
{
"_id": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
"t": "d",
"usernames": [
"roxie",
"test.john"
],
"usersCount": 2,
"msgs": 10,
"ts": "2023-07-11T01:37:04.552Z",
"uids": [
"5fRTXMt7DMJbpPJfh",
"rbAXPnMktTFbNpwtJ"
],
"encrypted": true,
"default": false,
"ro": false,
"sysMes": true,
"_updatedAt": "2023-10-30T20:37:17.317Z",
"_USERNAMES": [
"test.test",
"test.test"
],
"e2eKeyId": "eyJhbGciOiJB",
"lastMessage": {
"_id": "qpx24HcNoTZCoj7jZ",
"rid": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
"msg": "gvjkbvjjgi",
"ts": "2023-10-30T20:37:17.160Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
},
"_updatedAt": "2023-10-30T20:37:17.267Z",
"urls": [],
"mentions": [],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "PLAIN_TEXT",
"value": "gvjkbvjjgi"
}
]
}
]
},
"lm": "2023-10-30T20:37:17.160Z",
"topic": "Discuss all of the testing"
},
{
"_id": "65400fc3a2f73c7460e18e9f",
"t": "d",
"usernames": [
"roxie",
"hookdeck.write",
"test.john"
],
"usersCount": 3,
"msgs": 8,
"ts": "2023-10-30T20:19:15.092Z",
"uids": [
"5fRTXMt7DMJbpPJfh",
"hFDuCPam7sWziWFYa",
"rbAXPnMktTFbNpwtJ"
],
"encrypted": true,
"default": false,
"ro": false,
"sysMes": true,
"_updatedAt": "2023-10-30T20:36:41.696Z",
"_USERNAMES": [
"roxie",
"hookdeck.write",
"test.john"
],
"topic": "Discuss all of the testing",
"lastMessage": {
"_id": "dgDTvDAXN4eCLptr8",
"rid": "65400fc3a2f73c7460e18e9f",
"msg": "@test.john",
"ts": "2023-10-30T20:36:41.494Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
},
"_updatedAt": "2023-10-30T20:36:41.613Z",
"urls": [],
"mentions": [
{
"_id": "5fRTXMt7DMJbpPJfh",
"username": "test.john",
"name": "Test John",
"type": "user"
}
],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "MENTION_USER",
"value": {
"type": "PLAIN_TEXT",
"value": "test.john"
}
}
]
}
]
},
"lm": "2023-10-30T20:36:41.494Z"
}
],
"offset": 0,
"count": 2,
"total": 2,
"success": true
}
object
ims
Array of object
object
_id
string
t
string
usernames
Array of string
string
usersCount
integer
msgs
integer
ts
string
uids
Array of string
string
encrypted
boolean
default
boolean
ro
boolean
sysMes
boolean
_updatedAt
string
_USERNAMES
Array of string
string
e2eKeyId
string
lastMessage
object
_id
string
rid
string
msg
string
ts
string
u
object
_id
string
username
string
name
string
_updatedAt
string
urls
Array of object
object
mentions
Array of object
object
_id
string
username
string
name
string
type
string
channels
Array of object
object
md
Array of object
object
type
string
value
Array of object
object
type
string
value
string
lm
string
topic
string
offset
integer
count
integer
total
integer
success
boolean
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
Was this article helpful?