List Rooms and Discussions of a Team

Prev Next
Get
/api/v1/teams.listChildren

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.

Header parameters
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
Query parameters
teamName
string

The team name. It is required if the teamId is not provided.

Examplelivestream
teamId
string

The team id. It is required if the teamName is not provided.

Example63f3efc4b000b6b6d86704b2
offset
integer

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.

Example50
count
integer

The number of items to return. Refer to the official documentation to learn more.

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}. Refer to the official documentation to learn more.

filter
string

Filter the results using the text you want to find.

type
string

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.

roomId
string

The room ID. This parameter is required if you have not provided the teamId or the teamName.

Example66c82d78237405fc05fc1eef
Responses
200

OK

Success
{
  "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
}
Expand All
object
total
integer
data
Array of object
object
_id
string
fname
string
_updatedAt
string
topic
string
broadcast
boolean
encrypted
boolean
name
string
t
string
msgs
integer
usersCount
integer
u
object
_id
string
username
string
name
string
ts
string
ro
boolean
default
boolean
sysMes
boolean
teamId
string
teamMain
boolean
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
channels
Array of object
object
md
Array of object
object
type
string
value
Array of object
object
type
string
value
string
lm
string
customFields
object
offset
integer
count
integer
success
boolean
400

Bad Request

Example 1
{
  "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"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string