> ## 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 Voice Dictionary

> Creates a new voice dictionary with custom pronunciation rules.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/voice-agents/voice-dictionaries
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:
    post:
      summary: Create a Voice Dictionary
      description: Creates a new voice dictionary with custom pronunciation rules.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVoiceDictionaryRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVoiceDictionaryResponse'
        '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:
    CreateVoiceDictionaryRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the voice dictionary.
          example: Medical Terms Dictionary
        words:
          type: array
          description: Array of word pronunciation mappings.
          items:
            type: object
            properties:
              word:
                type: string
                description: The word to be replaced.
                example: acetaminophen
              pronunciation:
                type: string
                description: The pronunciation or replacement text.
                example: uh-SEE-tuh-MIN-uh-fen
            required:
              - word
              - pronunciation
      required:
        - name
        - words
    CreateVoiceDictionaryResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Voice dictionary created successfully
        messageKey:
          type: string
          example: VoiceDictionaryCreatedSuccessfully
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
            name:
              type: string
              example: Medical Terms Dictionary
            words:
              type: array
              items:
                type: object
                properties:
                  word:
                    type: string
                    example: acetaminophen
                  pronunciation:
                    type: string
                    example: uh-SEE-tuh-MIN-uh-fen
            createdAt:
              type: string
              format: date-time
              example: '2024-01-15T10: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>'

````