> ## 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's Teams > Get the list of teams that a specific user is a member of. The teams returned by the endpoint depend on your permissions. To view all teams, you need the `view-all-teams` permission. ## OpenAPI ````json GET /api/v1/users.listTeams { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "User Management" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "LDAP" }, { "name": "Permissions" }, { "name": "Roles" }, { "name": "Users" }, { "name": "SAML" } ], "paths": { "/api/v1/users.listTeams": { "get": { "tags": [ "Users" ], "summary": "List User's Teams", "description": "Get the list of teams that a specific user is a member of. The teams returned by the endpoint depend on your permissions. To view all teams, you need the `view-all-teams` permission.", "operationId": "get-api-v1-users.listTeams", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" }, { "name": "userId", "in": "query", "description": "The `userId` of the user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "teams": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "integer" }, "createdAt": { "type": "string" }, "createdBy": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" } } }, "_updatedAt": { "type": "string" }, "roomId": { "type": "string" }, "isOwner": { "type": "boolean" } } } }, "success": { "type": "boolean" } } }, "examples": { "Success Example": { "value": { "teams": [ { "_id": "612b8ae982d286c3", "name": "documentation-team", "type": 0, "createdAt": "2021-08-29T13:26:01.75Z", "createdBy": { "_id": "JxemcN9PDCdfzJe", "username": "renato.b" }, "_updatedAt": "2021-08-29T13:26:01.762Z", "roomId": "GwktYAajqw4RiWiBK", "isOwner": true } ], "success": true } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "Example 1": { "value": { "success": false, "error": "must have required property 'userId' [invalid-params]", "errorType": "invalid-params" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The authenticated user token.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The authenticated user ID.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "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." } } } } } } } } } ````