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

# List groups

> Returns a paginated list of knowledge base groups used to organise documents.



## OpenAPI

````yaml /openapi.json get /public/v1/knowledge-base/groups
openapi: 3.0.3
info:
  title: Callin Public API
  version: 1.0.0
  description: >-
    The Callin public API lets you programmatically build and manage AI voice
    agents, control their knowledge bases, and retrieve call logs and
    transcripts. All endpoints are versioned under /public/v1.
servers:
  - url: https://api.callin.io/api
    description: API Endpoint
security: []
tags:
  - name: Health
    description: Service availability check. No authentication required.
  - name: Identity
    description: Verify which account is associated with the current API key.
  - name: Agents
    description: Create, retrieve, and update AI voice agents.
  - name: Conversations
    description: List and inspect call logs, transcripts, and conversation details.
  - name: Knowledge Base
    description: Manage documents and groups that agents use during calls.
paths:
  /public/v1/knowledge-base/groups:
    get:
      tags:
        - Knowledge Base
      summary: List groups
      description: >-
        Returns a paginated list of knowledge base groups used to organise
        documents.
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
          description: Used for fetching next page. Cursor is returned in the response.
        - name: pageSize
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 30
          description: >-
            How many groups to return at maximum. Can not exceed 100, defaults
            to 30.
        - name: search
          in: query
          schema:
            type: string
          description: Search for groups by name
        - name: sortBy
          in: query
          schema:
            type: string
            enum:
              - name
              - created_at
          description: The field to sort the results by
        - name: sortDirection
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
          description: The direction to sort the results
      responses:
        '200':
          description: Groups list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessGroupListResponse'
        '400':
          description: Invalid query params
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyHeader: []
        - BearerAuth: []
components:
  schemas:
    SuccessGroupListResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          description: A list of groups and their metadata
          type: array
          items:
            $ref: '#/components/schemas/GroupDetails'
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
      description: Paginated knowledge groups.
    ErrorResponse:
      type: object
      description: >-
        Returned for most client and validation errors. Read `error.message` and
        optional `error.fields` for details.
      properties:
        success:
          type: boolean
          example: false
          description: Always `false` for this shape.
        error:
          type: object
          description: Structured error payload from the API.
          properties:
            code:
              type: string
              description: Stable machine-oriented error code when provided.
            message:
              type: string
              description: Human-readable explanation suitable to show or log.
            status:
              type: integer
              description: HTTP status code echoed for convenience.
            fields:
              type: array
              description: >-
                Optional per-field validation issues (shape is
                endpoint-specific).
              items:
                type: object
    GroupDetails:
      type: object
      properties:
        groupId:
          type: string
          description: The ID of the group
        name:
          type: string
          description: The name of the group
        documents:
          type: array
          description: A list of documents in the group
          items:
            $ref: '#/components/schemas/DocumentDetails'
        metadata:
          type: object
          properties:
            createdAt:
              type: string
              format: date-time
              description: The date and time the group was created
            createdBy:
              $ref: '#/components/schemas/MetaCreatedBy'
    PaginationMeta:
      type: object
      properties:
        pageSize:
          type: integer
          description: >-
            How many items to return at maximum. Can not exceed 100, defaults to
            30.
        hasMore:
          type: boolean
          description: Indicates if there are more items to fetch.
        nextCursor:
          type: string
          nullable: true
          description: Used for fetching next page. Cursor is returned in the response.
        sortBy:
          type: string
          description: The field to sort the results by.
          example: name
        sortDirection:
          type: string
          enum:
            - asc
            - desc
          description: The direction to sort the results.
          example: asc
    DocumentDetails:
      oneOf:
        - $ref: '#/components/schemas/DocumentDetailsUrl'
        - $ref: '#/components/schemas/DocumentDetailsFile'
      discriminator:
        propertyName: type
        mapping:
          url:
            $ref: '#/components/schemas/DocumentDetailsUrl'
          file:
            $ref: '#/components/schemas/DocumentDetailsFile'
    MetaCreatedBy:
      type: object
      properties:
        userId:
          type: string
          description: The ID of the user who created the item
        userEmail:
          type: string
          description: The email of the user who created the item
    DocumentDetailsUrl:
      type: object
      description: >-
        URL-sourced document. `details` holds only `url`; file fields live only
        on file documents.
      additionalProperties: false
      properties:
        documentId:
          type: string
          description: The ID of the document.
        type:
          type: string
          enum:
            - url
          description: 'Discriminator: URL document.'
        name:
          type: string
          description: The display name of the document.
        details:
          $ref: '#/components/schemas/DocumentUrlDetails'
        metadata:
          type: object
          description: Optional server metadata.
          properties:
            createdAt:
              type: string
              format: date-time
              description: When the document was created.
            createdBy:
              $ref: '#/components/schemas/MetaCreatedBy'
    DocumentDetailsFile:
      type: object
      description: >-
        Uploaded file document. `details` holds storage URL, MIME type, and
        size; display name is `name`.
      additionalProperties: false
      properties:
        documentId:
          type: string
          description: The ID of the document.
        type:
          type: string
          enum:
            - file
          description: 'Discriminator: uploaded file document.'
        name:
          type: string
          description: Display name (often the original file name).
        details:
          $ref: '#/components/schemas/DocumentFileDetails'
        metadata:
          type: object
          description: Optional server metadata.
          properties:
            createdAt:
              type: string
              format: date-time
              description: When the document was created.
            createdBy:
              $ref: '#/components/schemas/MetaCreatedBy'
    DocumentUrlDetails:
      type: object
      description: Type-specific payload when `type` is `url` (no file fields).
      additionalProperties: false
      properties:
        url:
          type: string
          description: The source URL of the document.
    DocumentFileDetails:
      type: object
      description: Type-specific payload when `type` is `file` (no source URL).
      additionalProperties: false
      properties:
        fileUrl:
          type: string
          description: Public URL of the stored file.
        fileType:
          type: string
          description: MIME type of the file (e.g. `application/pdf`, `text/plain`).
        fileSize:
          type: number
          description: File size in bytes.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Send your Callin API key in the `x-api-key` header.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Same API key as a Bearer token: `Authorization: Bearer <your-api-key>`.'

````