Skip to main content
PATCH
/
v1
/
voice-agents
/
voice-dictionaries
/
{id}
Update Voice Dictionary
curl --request PATCH \
  --url https://api.tryhamsa.com/v1/voice-agents/voice-dictionaries/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Updated Medical Terms Dictionary",
  "words": [
    {
      "word": "ibuprofen",
      "pronunciation": "eye-byoo-PROH-fen"
    }
  ]
}
'
{
  "success": true,
  "message": "Voice dictionary updated successfully",
  "messageKey": "VoiceDictionaryUpdatedSuccessfully",
  "data": {
    "id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "name": "Updated Medical Terms Dictionary",
    "words": [
      {}
    ],
    "updatedAt": "2024-01-15T11: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 '

Path Parameters

id
string<uuid>
required

UUID of the voice dictionary.

Example:

"48f7656f-098b-4c43-b165-7cfd2cc8ac30"

Body

application/json
name
string

Updated name of the voice dictionary.

Example:

"Updated Medical Terms Dictionary"

words
object[]

Updated array of word pronunciation mappings.

Response

Successful response

success
boolean
Example:

true

message
string
Example:

"Voice dictionary updated successfully"

messageKey
string
Example:

"VoiceDictionaryUpdatedSuccessfully"

data
object