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

# Toggle activation of a web tool for a voice agent.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/voice-agents/web-tool/toggle-activation
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/web-tool/toggle-activation:
    post:
      summary: Toggle activation of a web tool for a voice agent.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleWebToolActivationRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    default: false
                  message:
                    type: string
                    default: success
                    enum:
                      - Web tool activated successfully!
                      - Web tool deactivated successfully!
                    example: Web tool activated successfully!
        '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:
    ToggleWebToolActivationRequest:
      type: object
      properties:
        voiceAgentId:
          type: string
          description: The voice agent ID to toggle the activation of the web tool on.
          example: d949f13f-40d2-4e48-ac86-b66633070603
        webToolId:
          type: string
          description: The web tool ID to toggle the activation of.
          example: d949f13f-40d2-4e48-ac86-b66633070603
        isActive:
          type: boolean
          description: >-
            The value of isActive to toggle the activation of the web tool. True
            to activate, false to deactivate. Defaults to true.
          example: true
          default: true
      required:
        - projectId
        - voiceAgentId
        - webToolId
    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>'

````