> ## 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 (admin IAM — same list service as SPA `/teams`).



## OpenAPI

````yaml https://app-api.costory.io/docs/openapi.json get /terraform/teams
openapi: 3.0.0
info:
  title: Costory
  version: '1.0'
  description: API Documentation
servers:
  - url: ''
    description: Production server
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 (admin
        IAM — same list service as SPA `/teams`).
      responses:
        '200':
          description: Teams in the organization
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AdminTeamWithMembers'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    AdminTeamWithMembers:
      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
        destinationType:
          type: string
          enum:
            - SLACK
            - EMAIL
            - TEAMS
        destinationEnabled:
          type: boolean
        destination:
          type: string
          nullable: true
        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
        _count:
          type: object
          properties:
            members:
              type: number
          required:
            - members
        members:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                  - OWNER
                  - MEMBER
            required:
              - role
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - description
        - visibility
        - defaultCostMetric
        - destinationType
        - destinationEnabled
        - destination
        - organizationId
        - scopes
        - _count
        - members
    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.

````

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