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

# List Teams

> List the caller's teams.

PR 5c (Class-C volume reduction, 2026-05-16 audit): emits
``Cache-Control: private, max-age=15`` + a weak ETag. The
browser-side cache absorbs most of the polling traffic that made
this the #1 Sentry saturation source. After ``max-age`` expires,
revalidation hits this handler with ``If-None-Match`` and gets a
304 if the team set hasn't changed — cheap enough that bandwidth +
re-render are saved even on the cache-miss path.

The query itself (``team_service.list_teams``) is unchanged; the
fix is purely the response envelope. See
``docs/plans/2026-05-16-session-boundary-cleanup.md`` §PR 5c.



## OpenAPI

````yaml /openapi.json get /api/v1/teams
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/teams:
    get:
      tags:
        - Teams
      summary: List Teams
      description: |-
        List the caller's teams.

        PR 5c (Class-C volume reduction, 2026-05-16 audit): emits
        ``Cache-Control: private, max-age=15`` + a weak ETag. The
        browser-side cache absorbs most of the polling traffic that made
        this the #1 Sentry saturation source. After ``max-age`` expires,
        revalidation hits this handler with ``If-None-Match`` and gets a
        304 if the team set hasn't changed — cheap enough that bandwidth +
        re-render are saved even on the cache-miss path.

        The query itself (``team_service.list_teams``) is unchanged; the
        fix is purely the response envelope. See
        ``docs/plans/2026-05-16-session-boundary-cleanup.md`` §PR 5c.
      operationId: list_teams_api_v1_teams_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamListResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    TeamListResponse:
      properties:
        teams:
          items:
            $ref: '#/components/schemas/TeamResponse'
          type: array
          title: Teams
      type: object
      required:
        - teams
      title: TeamListResponse
    TeamResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        team_type:
          type: string
          title: Team Type
        display_name:
          type: string
          title: Display Name
        status:
          type: string
          title: Status
        workflow_phase:
          type: string
          title: Workflow Phase
          default: onboarding
        workflow_phase_label:
          type: string
          title: Workflow Phase Label
          default: Setting Up
        tier:
          type: string
          title: Tier
        operation_mode:
          type: string
          title: Operation Mode
        trigger_mode:
          type: string
          title: Trigger Mode
          default: strategy-driven
        default_currency:
          type: string
          title: Default Currency
          default: USD
        auto_config:
          additionalProperties: true
          type: object
          title: Auto Config
          default: {}
        orchestrator_cadence:
          additionalProperties: true
          type: object
          title: Orchestrator Cadence
          default: {}
        content_strategy:
          additionalProperties: true
          type: object
          title: Content Strategy
          default: {}
        stripe_subscription_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Subscription Id
        config:
          additionalProperties: true
          type: object
          title: Config
          default: {}
        onboarding_step:
          type: string
          title: Onboarding Step
          default: pending
        connected_accounts:
          items:
            type: string
          type: array
          title: Connected Accounts
          default: []
        brand_kit_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Brand Kit Id
        brand_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Brand Id
        brand_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand Name
        hired_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Hired At
        paused_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Paused At
        cancelled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancelled At
        subscription_ends_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Subscription Ends At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - team_type
        - display_name
        - status
        - tier
        - operation_mode
        - created_at
        - updated_at
      title: TeamResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````