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

# Update Voice Dictionary

> Updates an existing voice dictionary.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/voice-agents/voice-dictionaries/{id}
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/voice-dictionaries/{id}:
    patch:
      summary: Update Voice Dictionary
      description: Updates an existing voice dictionary.
      parameters:
        - in: path
          name: id
          required: true
          description: UUID of the voice dictionary.
          schema:
            type: string
            format: uuid
            example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateVoiceDictionaryRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateVoiceDictionaryResponse'
        '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: Voice dictionary 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:
    UpdateVoiceDictionaryRequest:
      type: object
      properties:
        name:
          type: string
          description: Updated name of the voice dictionary.
          example: Updated Medical Terms Dictionary
        words:
          type: array
          description: Updated array of word pronunciation mappings.
          items:
            type: object
            properties:
              word:
                type: string
                example: ibuprofen
              pronunciation:
                type: string
                example: eye-byoo-PROH-fen
    UpdateVoiceDictionaryResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Voice dictionary updated successfully
        messageKey:
          type: string
          example: VoiceDictionaryUpdatedSuccessfully
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
            name:
              type: string
              example: Updated Medical Terms Dictionary
            words:
              type: array
              items:
                type: object
            updatedAt:
              type: string
              format: date-time
              example: '2024-01-15T11:30:00Z'
    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>'

````