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

# List Teams

> Returns a list of all teams in the organization. The response includes team details such as name, UUID, and parent team information if applicable.



## OpenAPI

````yaml /api-reference/openapi.json get /organizations/teams
openapi: 3.0.1
info:
  title: Attention Service V2
  description: Attention Service API V2
  termsOfService: https://www.attention.com/terms-of-use
  contact:
    name: Attention Team
    url: https://docs.attention.com/welcome
    email: support@attention.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.8.0
servers:
  - url: https://api.attention.tech/v2
security:
  - APIKeyHeader: []
paths:
  /organizations/teams:
    get:
      tags:
        - Organization
      summary: List Teams
      description: >-
        Returns a list of all teams in the organization. The response includes
        team details such as name, UUID, and parent team information if
        applicable.
      operationId: listOrganizationTeams
      responses:
        '200':
          description: Teams successfully returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TeamResponse'
        '401':
          description: Valid API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Base_401_Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Base_401_Error'
        '500':
          description: Unexpected server error. Please try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Base_500_Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Base_500_Error'
components:
  schemas:
    TeamResponse:
      type: object
      properties:
        data:
          type: array
          description: List of teams
          items:
            $ref: '#/components/schemas/Team'
        meta:
          $ref: '#/components/schemas/Meta'
      description: Response containing a list of teams and metadata
      example:
        data:
          - uuid: team-uuid-123
            name: Sales Team
            domain: sales.example.com
            organizationUUID: org-uuid-456
            phrases:
              - revenue
              - deal
            consentEmailEnabled: true
            organizerJoinInternalMeetings: false
        meta:
          totalRecords: 1
    Base_401_Error:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/BaseError'
      example:
        code: 401
        message: unauthenticated for Invalid API key
    Base_500_Error:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Error'
      example:
        code: '500'
        detail: >-
          An unexpected error occurred on the server. Please try again later or
          contact support if the problem persists.
        id: internal_server_error
        title: Internal Server Error
    Team:
      type: object
      properties:
        uuid:
          type: string
          description: Unique identifier of the team
          example: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
        name:
          type: string
          description: Name of the team
          example: Engineering
        phrases:
          type: array
          description: List of keywords or phrases associated with the team
          example:
            - engineering
            - tech
            - development
          items:
            type: string
        slackConnection:
          $ref: '#/components/schemas/SlackConnection'
        domain:
          type: string
          description: Domain associated with the team
          example: attention.tech
        organizerJoinInternalMeetings:
          type: boolean
          description: Whether team organizers can join internal meetings
          example: true
        consentEmailEnabled:
          type: boolean
          description: Whether email consent is enabled for the team
          example: true
        parentTeamUUID:
          type: string
          description: UUID of the parent team if this team is part of a hierarchy
          example: 2ccf9bde-68e3-4de4-bc4e-51b927336665
        organizationUUID:
          type: string
          description: UUID of the organization this team belongs to
          example: 16b78cec-82ef-46d2-8213-5d3bb7d2571c
        children:
          type: array
          description: List of child teams if this team has a hierarchical structure
          items:
            $ref: '#/components/schemas/Team'
      description: >-
        Represents a team in the system with its properties and hierarchical
        structure
      example:
        uuid: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
        name: Engineering
        phrases:
          - engineering
          - tech
          - development
        domain: attention.tech
        organizerJoinInternalMeetings: true
        consentEmailEnabled: true
        parentTeamUUID: 2ccf9bde-68e3-4de4-bc4e-51b927336665
        organizationUUID: 16b78cec-82ef-46d2-8213-5d3bb7d2571c
    Meta:
      type: object
      properties:
        pageCount:
          type: integer
        totalRecords:
          type: integer
        pageNumber:
          type: integer
        pageSize:
          type: integer
      example:
        pageCount: 5
        totalRecords: 100
        pageNumber: 1
        pageSize: 20
    BaseError:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
      example:
        code: unauthorized
        message: Invalid or expired API key
    Error:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        status:
          type: string
          description: >-
            The HTTP status code applicable to this problem, expressed as a
            string value.
        code:
          type: string
          description: An application-specific error code, expressed as a string value.
        title:
          type: string
          description: A short, human-readable summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          properties: {}
      example:
        id: not_found_error
        status: '404'
        code: '404'
        title: Not Found Error
        detail: The requested resource was not found
        source:
          pointer: /data/attributes/id
    SlackConnection:
      type: object
      properties:
        id:
          type: string
          description: Slack connection identifier
          example: T1234567890
        info:
          $ref: '#/components/schemas/SlackTeamInfo'
      description: Represents the Slack integration details for a team
      example:
        id: T1234567890
        info:
          id: T01234567
          name: Acme Corp
    SlackTeamInfo:
      type: object
      properties:
        id:
          type: string
          description: Slack team identifier
          example: T1234567890
        name:
          type: string
          description: Name of the Slack team
          example: Attention Tech
      description: Information about a connected Slack team
      example:
        id: T01234567
        name: Acme Corp
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````