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

# Move Web Tool to Collection

> Moves a web tool into a collection or removes it from a collection (when collectionId is null).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/voice-agents/collections/move
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/move:
    post:
      summary: Move Web Tool to Collection.
      description: >-
        Moves a web tool into a collection or removes it from a collection (when
        collectionId is null).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveToolToCollectionRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoveToolToCollectionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Not found
          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:
    MoveToolToCollectionRequest:
      type: object
      properties:
        webToolId:
          type: string
          format: uuid
          description: UUID of the web tool to move.
          example: d949f13f-40d2-4e48-ac86-b66633070603
        collectionId:
          type: string
          format: uuid
          description: >-
            UUID of the collection to move the tool to. Set to null to remove
            from collection.
          example: d949f13f-40d2-4e48-ac86-b66633070603
          nullable: true
      required:
        - webToolId
    MoveToolToCollectionResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Web tool moved successfully
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  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>'

````