> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # List User Rooms of a Team > Lists only the team's rooms that a particular user has joined. Permissions required: `view-all-teams`, `view-all-team-channels` ## OpenAPI ````json GET /api/v1/teams.listRoomsOfUser { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/teams.listRoomsOfUser": { "get": { "tags": [ "Teams" ], "summary": "List User Rooms of a Team", "description": "Lists only the team's rooms that a particular user has joined.\n\nPermissions required: `view-all-teams`, `view-all-team-channels`", "operationId": "get-api-v1-teams.listRoomsOfUser", "parameters": [ { "$ref": "#/components/parameters/UserId" }, { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/Optional-TeamName" }, { "$ref": "#/components/parameters/Optional-TeamId" }, { "name": "userId", "in": "query", "description": "The user ID.", "required": true, "schema": { "type": "string" }, "example": "rbAXrutTFbNprfn" }, { "$ref": "#/components/parameters/offset" }, { "$ref": "#/components/parameters/count" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "fname": { "type": "string" }, "customFields": { "type": "object" }, "description": { "type": "string" }, "broadcast": { "type": "boolean" }, "encrypted": { "type": "boolean" }, "federated": { "type": "boolean" }, "name": { "type": "string" }, "t": { "type": "string" }, "msgs": { "type": "integer" }, "usersCount": { "type": "integer" }, "u": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" } } }, "ts": { "type": "string" }, "ro": { "type": "boolean" }, "default": { "type": "boolean" }, "sysMes": { "type": "boolean" }, "_updatedAt": { "type": "string" }, "lm": { "type": "string" }, "lastMessage": { "type": "object", "properties": { "_id": { "type": "string" }, "t": { "type": "string" }, "msg": { "type": "string" }, "groupable": { "type": "boolean" }, "blocks": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "blockId": { "type": "string" }, "callId": { "type": "string" }, "appId": { "type": "string" } } } }, "ts": { "type": "string" }, "u": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" }, "name": { "type": "string" } } }, "rid": { "type": "string" }, "_updatedAt": { "type": "string" }, "urls": { "type": "array", "items": { "type": "object" } }, "mentions": { "type": "array", "items": { "type": "object" } }, "channels": { "type": "array", "items": { "type": "object" } } } }, "teamId": { "type": "string" }, "teamDefault": { "type": "boolean" }, "isLastOwner": { "type": "boolean" } } } }, "total": { "type": "integer" }, "count": { "type": "integer" }, "offset": { "type": "integer" }, "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "rooms": [ { "_id": "JKa7R9zu2DinBhBN9", "fname": "Livestream", "customFields": {}, "description": "", "broadcast": false, "encrypted": false, "federated": false, "name": "Livestream", "t": "c", "msgs": 16, "usersCount": 4, "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie" }, "ts": "2023-02-22T17:15:26.989Z", "ro": false, "default": false, "sysMes": true, "_updatedAt": "2023-09-29T06:02:30.25Z", "lm": "2023-09-14T12:06:00.594Z", "lastMessage": { "_id": "rtf5JoPLQup3X7Aof", "t": "videoconf", "msg": "", "groupable": false, "blocks": [ { "type": "video_conf", "blockId": "6502f728a2f73c7460df6f71", "callId": "6502f728a2f73c7460df6f71", "appId": "videoconf-core" } ], "ts": "2023-09-14T12:06:00.594Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "test.test", "name": "test test" }, "rid": "JKa7R9zu2DinBhBN9", "_updatedAt": "2023-09-14T12:06:00.685Z", "urls": [], "mentions": [], "channels": [] }, "teamId": "63f3efc4b000b6b6d86704b2", "teamDefault": true, "isLastOwner": true } ], "total": 1, "count": 1, "offset": 0, "success": true } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" }, "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "Optional-TeamName": { "name": "teamName", "in": "query", "description": "The team name. It is required if the `teamId` is not provided.", "required": false, "schema": { "type": "string" }, "example": "livestream" }, "Optional-TeamId": { "name": "teamId", "in": "query", "description": "The team id. It is required if the `teamName` is not provided.", "schema": { "type": "string" }, "example": "63f3efc4b000b6b6d86704b2" }, "offset": { "name": "offset", "in": "query", "description": "Number of items to \"skip\" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.", "required": false, "schema": { "type": "integer" }, "example": 50 }, "count": { "name": "count", "in": "query", "description": "The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.", "required": false, "schema": { "type": "integer" }, "example": 50 } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````