> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tess.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Listar workspaces

> Devuelve los workspaces en los que tu token de API puede usarse, con tu rol en cada uno. No recibe el header x-workspace-id.

Llama a este endpoint primero cuando tu integración trabaja con varios workspaces. Devuelve el id a enviar en el header `x-workspace-id` de los demás endpoints, o en la entrada `workspace_id` de las herramientas de [Tess MCP](https://docs.tess.im/es/api-mcp.md#choosing-the-workspace).

Un workspace solo aparece cuando tu token se acepta en él: eres miembro activo, tu rol allí incluye acceso a la API, y las reglas de inicio de sesión único (SSO) del workspace no te bloquean. Los demás endpoints responden **403** para un workspace que no está en esta lista.


## OpenAPI

````yaml api-reference/tess-public-api.openapi.json GET /workspaces
openapi: 3.0.0
info:
  title: Tess API
  version: '0.1'
servers:
  - url: https://api.tess.im
security: []
paths:
  /workspaces:
    get:
      tags:
        - Workspaces
      summary: List workspaces
      description: >-
        Returns the workspaces this token can be used in, with the role of the
        token owner in each one. It takes no x-workspace-id header: call it
        first to get the id to send in the x-workspace-id header of the other
        endpoints.
      operationId: listWorkspaces
      responses:
        '200':
          description: The workspaces of the token owner
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        role:
                          type: string
                          nullable: true
                          description: Role of the token owner in this workspace
              example:
                data:
                  - id: 4645
                    name: Marketing
                    role: owner
                  - id: 4821
                    name: HR team
                    role: manager
                  - id: 4644
                    name: Sales
                    role: user
        '401':
          description: Unauthenticated
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      bearerFormat: Bearer
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.