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

# List your teams

> Every team you belong to, whether you've opened it yet or not. Use a team's `id` as `teamId` in the other endpoints.



## OpenAPI

````yaml /openapi.json get /teams
openapi: 3.1.0
info:
  title: TeamDuo REST API
  version: 1.0.0
  description: >-
    The subset of TeamDuo's REST API that an API key may call. Most of TeamDuo's
    backend is session-only by design — connecting a database, changing
    exposure, and managing your team all require a signed-in browser session.
    These five endpoints are the ones a key can reach, matching the read-only
    surface the MCP connector uses. See [Overview](/api-reference/introduction)
    before using this reference.
servers:
  - url: https://api.teamduo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /teams:
    get:
      tags:
        - Teams
      summary: List your teams
      description: >-
        Every team you belong to, whether you've opened it yet or not. Use a
        team's `id` as `teamId` in the other endpoints.
      operationId: listTeams
      responses:
        '200':
          description: Your teams.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Team'
              example:
                - id: cktm0001aaaa
                  name: Acme Analytics
                  slug: acme-analytics
                  role: ADMIN
                  status: ACTIVE
                  memberCount: 6
                  dataSourceCount: 2
                  createdAt: '2026-05-01T09:00:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - bearerAuth:
            - data:schema
components:
  schemas:
    Team:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        role:
          type: string
          enum:
            - OWNER
            - ADMIN
            - MEMBER
          description: Your role on this team.
        status:
          type: string
          enum:
            - INVITED
            - ACTIVE
          description: INVITED means you haven't opened this team yet.
        memberCount:
          type: integer
        dataSourceCount:
          type: integer
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - slug
        - role
        - status
        - memberCount
        - dataSourceCount
        - createdAt
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable explanation. Always safe to show a user or an agent.
        code:
          type: string
          description: Stable machine-readable code, when the error has one.
      required:
        - error
    ScopeError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              const: SCOPE_REQUIRED
            requiredScope:
              type: string
              description: >-
                The scope this key is missing, when the route needs a specific
                one.
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The token is valid but its scopes don't cover this route.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ScopeError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key (`sk_live_...`) created under Settings → API keys, or a
        short-lived JWT access token from a browser session. A key only reaches
        the scope it was granted; see [API keys and
        scopes](/reference/api-keys).

````