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

# Get all agent groups for the authenticated organization

> Returns every agent group that belongs to the organization derived from the API key, each enriched with the number of agents currently assigned to it.



## OpenAPI

````yaml https://api.callers.ai/openapi-json get /agent-groups
openapi: 3.0.0
info:
  title: Callers API
  description: API documentation for Callers, providing endpoints for seamless integration.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.callers.ai
security: []
tags: []
paths:
  /agent-groups:
    get:
      tags:
        - Agent Groups
      summary: Get all agent groups for the authenticated organization
      description: >-
        Returns every agent group that belongs to the organization derived from
        the API key, each enriched with the number of agents currently assigned
        to it.
      operationId: CampaignGroupPublicController_listCampaignGroups[0]
      parameters:
        - name: x-sub-organization-id
          in: header
          schema:
            type: string
          description: >-
            Optional sub organization ID. Must belong to your main organization
            API key.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CampaignGroupPublicDto'
      security:
        - Authorization: []
components:
  schemas:
    CampaignGroupPublicDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique identifier for the agent group. String representation of an
            ObjectId.
          example: 507f1f77bcf86cd799439011
        name:
          type: string
          description: Display name of the agent group.
          example: Onboarding Campaigns
        organizationId:
          type: string
          description: >-
            Id of the organization this agent group belongs to. String
            representation of an ObjectId.
          example: 507f1f77bcf86cd799439012
        campaignsCount:
          type: number
          description: Number of agents currently assigned to this agent group.
          example: 3
        createdAt:
          type: string
          description: Timestamp when the agent group was created (ISO 8601 string).
          format: date-time
          example: '2024-04-09T12:00:00.000Z'
          nullable: true
        updatedAt:
          type: string
          description: Timestamp when the agent group was last updated (ISO 8601 string).
          format: date-time
          example: '2024-04-09T13:30:00.000Z'
          nullable: true
      required:
        - id
        - name
        - organizationId
        - campaignsCount
        - createdAt
        - updatedAt
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization

````