Lists a particular team's public rooms, discussions, and the rooms (public/private) a user is part of from the team's main room. Currently, this endpoint returns the discussions from the parent team rooms only; discussions from sub-channels are not returned.
The userId
of the authenticated user.
The authToken
of the authenticated user.
The team name. It is required if the teamId
is not provided.
The team id. It is required if the teamName
is not provided.
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
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}. Refer to the official documentation to learn more.
Filter the results using the text you want to find.
You can choose the type of rooms you want in the response. Enter the value as channels
or discussions
. If you don't enter any value, both types are returned.
The room ID. This parameter is required if you have not provided the teamId
or the teamName
.
OK
{
"total": 2,
"data": [
{
"_id": "66c82d78237405fc05fc1eef",
"fname": "test-team",
"_updatedAt": "2024-09-20T12:27:38.725Z",
"topic": "",
"broadcast": false,
"encrypted": false,
"name": "test-team",
"t": "c",
"msgs": 3,
"usersCount": 1,
"u": {
"_id": "C38WSSzrGd2NCjzqJ",
"username": "test.cat",
"name": "test.cat"
},
"ts": "2024-08-23T06:34:32.413Z",
"ro": false,
"default": false,
"sysMes": true,
"teamId": "66c82d78237405fc05fc1ef1",
"teamMain": true,
"lastMessage": {
"_id": "ZaeoxcCsHLutRkh9m",
"rid": "66c82d78237405fc05fc1eef",
"msg": "testing",
"ts": "2024-09-20T12:27:38.634Z",
"u": {
"_id": "C38WSSzrGd2NCjzqJ",
"username": "test.cat",
"name": "test.cat"
},
"_updatedAt": "2024-09-20T12:27:38.686Z",
"urls": [],
"mentions": [],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "PLAIN_TEXT",
"value": "testing"
}
]
}
]
},
"lm": "2024-09-20T12:27:38.634Z"
},
{
"_id": "66ed2dba40141d95f32c292b",
"fname": "new-channel",
"_updatedAt": "2024-09-20T12:29:08.284Z",
"customFields": {},
"topic": "",
"broadcast": false,
"encrypted": false,
"name": "new-channel",
"t": "p",
"msgs": 3,
"usersCount": 2,
"u": {
"_id": "C38WSSzrGd2NCjzqJ",
"username": "test.cat",
"name": "test.cat"
},
"ts": "2024-09-20T08:09:30.417Z",
"ro": false,
"teamId": "66c82d78237405fc05fc1ef1",
"default": false,
"sysMes": true,
"lastMessage": {
"_id": "xZhJfE4rmaosjHZCe",
"rid": "66ed2dba40141d95f32c292b",
"msg": "testing",
"ts": "2024-09-20T12:27:53.356Z",
"u": {
"_id": "C38WSSzrGd2NCjzqJ",
"username": "test.cat",
"name": "test.cat"
},
"_updatedAt": "2024-09-20T12:27:53.397Z",
"urls": [],
"mentions": [],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "PLAIN_TEXT",
"value": "testing"
}
]
}
]
},
"lm": "2024-09-20T12:27:53.356Z"
}
],
"offset": 0,
"count": 50,
"success": true
}
Bad Request
{
"success": false,
"error": "must have required property 'teamId'\n must have required property 'teamName'\n must have required property 'roomId'\n must match exactly one schema in oneOf [invalid-params]",
"errorType": "invalid-params"
}
Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}