Skip to main content
POST
/
v1
/
voice-agents
/
voice-dictionaries
Create a Voice Dictionary
curl --request POST \
  --url https://api.tryhamsa.com/v1/voice-agents/voice-dictionaries \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Medical Terms Dictionary",
  "words": [
    {
      "word": "acetaminophen",
      "pronunciation": "uh-SEE-tuh-MIN-uh-fen"
    }
  ]
}
'
{
  "success": true,
  "message": "Voice dictionary created successfully",
  "messageKey": "VoiceDictionaryCreatedSuccessfully",
  "data": {
    "id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "name": "Medical Terms Dictionary",
    "words": [
      {
        "word": "acetaminophen",
        "pronunciation": "uh-SEE-tuh-MIN-uh-fen"
      }
    ],
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Body

application/json
name
string
required

Name of the voice dictionary.

Example:

"Medical Terms Dictionary"

words
object[]
required

Array of word pronunciation mappings.

Response

Successful response

success
boolean
Example:

true

message
string
Example:

"Voice dictionary created successfully"

messageKey
string
Example:

"VoiceDictionaryCreatedSuccessfully"

data
object