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

# List teams in the organization via Admin API

> Returns all non-archived teams for the authenticated organization.



## OpenAPI

````yaml /api-reference/openapi.json get /terraform/teams
openapi: 3.0.0
info:
  title: Costory
  version: '1.0'
  description: API Documentation
servers:
  - url: https://app-api.costory.io
security: []
paths:
  /terraform/teams:
    get:
      tags:
        - Admin Teams
      summary: List teams in the organization via Admin API
      description: Returns all non-archived teams for the authenticated organization.
      responses:
        '200':
          description: Teams in the organization
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AdminTeam'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    AdminTeam:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        archivedAt:
          type: string
          nullable: true
          format: date-time
        name:
          type: string
        description:
          type: string
        visibility:
          type: string
          enum:
            - PUBLIC
            - PRIVATE
        defaultCostMetric:
          type: string
          enum:
            - cost
            - effective_cost
            - list_cost
            - contracted_cost
            - unblended_cost
            - net_unblended_cost
            - amortized_cost
            - net_amortized_cost
        organizationId:
          type: string
        scopes:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Scope row id.
              name:
                type: string
                description: Human-readable scope name.
              whereClause:
                type: object
                properties: {}
                additionalProperties: {}
                description: >-
                  Persisted react-querybuilder filter (RuleGroupType). Canonical
                  filter string for API clients is filterCel.
              filterCel:
                type: string
                description: >-
                  Team cost filter as CEL (Common Expression Language), derived
                  from whereClause.
            required:
              - id
              - name
              - whereClause
              - filterCel
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - description
        - visibility
        - defaultCostMetric
        - organizationId
        - scopes
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          description: Unauthorized error message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or Clerk ak_* API key
      description: >-
        Send `Authorization: Bearer <credential>` using either a Clerk session
        JWT or a Clerk API key (`ak_*`). API keys may identify a user (`user_*`)
        or organization (`org_*`) principal and are generated in the Clerk
        Dashboard under API keys.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-token
      description: >-
        API token for authentication (or Admin API key). The token is scoped per
        organization and can be retrieved in the Organization Switcher.

````