> ## 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.

# Create Collection

> Creates a new collection for organizing web tools.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/voice-agents/collections
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:
    post:
      summary: Create Collection.
      description: Creates a new collection for organizing web tools.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCollectionRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCollectionResponse'
        '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:
    CreateCollectionRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the collection.
          example: Customer Support Tools
        description:
          type: string
          description: Description of the collection (optional).
          example: Tools used for customer support operations
      required:
        - name
    CreateCollectionResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Collection created successfully
        data:
          $ref: '#/components/schemas/Collection'
    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>'

````