> ## 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.

# List Workspaces

> Returns the workspaces your API token can be used in, with your role in each one. It takes no x-workspace-id header.

Call this endpoint first when your integration works across several workspaces. It returns the id to send in the `x-workspace-id` header of the other endpoints, or in the `workspace_id` input of the [Tess MCP](https://docs.tess.im/en/api-mcp.md#choosing-the-workspace) tools.

A workspace is listed only when your token is accepted there: you are an active member, your role there includes API access, and the workspace's single sign-on rules do not block you. The other endpoints answer **403** for a workspace that is not in this list.


## 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.