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

# List Collections

> Retrieves a paginated list of collections with optional search functionality.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/voice-agents/collections/list
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/voice-agents/collections/list:
    get:
      summary: List Collections.
      description: >-
        Retrieves a paginated list of collections with optional search
        functionality.
      parameters:
        - in: query
          name: skip
          required: false
          description: Number of items to skip (pagination).
          schema:
            type: integer
            default: 1
            minimum: 1
            example: 1
        - in: query
          name: take
          required: false
          description: Number of items to take (pagination).
          schema:
            type: integer
            default: 10
            minimum: 1
            example: 10
        - in: query
          name: search
          required: false
          description: Searches collections by name or description.
          schema:
            type: string
            example: My Collection
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCollectionsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ListCollectionsResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Success
        data:
          type: object
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/Collection'
            total:
              type: integer
              description: Total number of collections.
              example: 25
            filtered:
              type: integer
              description: Number of collections after applying filters.
              example: 10
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    Collection:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the collection.
          example: d949f13f-40d2-4e48-ac86-b66633070603
        name:
          type: string
          description: Name of the collection.
          example: Customer Support Tools
        description:
          type: string
          description: Description of the collection.
          example: Tools used for customer support operations
          nullable: true
        userId:
          type: string
          format: uuid
          description: UUID of the user who created the collection.
          example: d949f13f-40d2-4e48-ac86-b66633070603
        projectId:
          type: string
          format: uuid
          description: UUID of the project.
          example: d949f13f-40d2-4e48-ac86-b66633070603
        webToolsCount:
          type: integer
          description: Number of web tools in this collection.
          example: 5
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the collection was created.
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the collection was last updated.
          example: '2024-01-15T10:30:00Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````