Skip to main content
PUT
What it does: Update an existing voice agent’s configuration. All request body fields are optional — only the fields you include are modified. Unspecified fields retain their current values. This endpoint is the primary way to configure an agent’s ASR, LLM, TTS, language settings, advance settings, and integrations.

Required Permission

agents

Path Parameters

Top-Level Request Body Fields

advanceSettings Fields

Sending an advanceSettings field that is not supported by the current ASR model returns HTTP 400. Use Get Transcriber Config to verify model compatibility before updating.

ASR Model Compatibility — advanceSettings Reference

Each advanceSettings field is valid only for specific ASR model types. Sending an incompatible field returns HTTP 400.

Minimum working example

Additional examples

Full configuration update

phraseConfig is omitted above because it is not supported by gnani_vachana_rest. Use a vocabulary-capable ASR model (see the compatibility table) if you need custom phrase hints.

Multilingual agent

Set botDetails.language to an array of up to three language codes. Use Get Transcriber Config and Get TTS Config to pick models and voices that support every language in the list.

Post-call webhook

Receive an HTTP callback at your URL when a call ends — instead of polling Get Conversation Logs on a schedule.

When to use hasPostCallTrigger

Typical webhook flow:
Configure hasPostCallTrigger and postCallTriggerAPIConfig on the same Update Agent request.

Enable the webhook

Verify the saved configuration with Get Agent — both hasPostCallTrigger and postCallTriggerAPIConfig are returned on the agent object.

Expected webhook payload

When a call ends, the platform POSTs a JSON body to your URL. Field names use snake_case (not the camelCase used by the Platform REST APIs). The payload includes call metadata, disposition extraction, the full transcript, and telephony CDR details. Example payload from a verified post-call webhook:
conversation_log mirrors transcript with the same turn-by-turn content. Both arrays are populated in live webhook deliveries — the example above omits duplicate entries for readability.
Webhook fields arrive in snake_case. When your endpoint receives the post-call callback, read keys such as conversation_id, bot_id, user_context, and disposition_result as snake_case — not the camelCase used by Platform REST APIs (conversationId, botId, userContext). Transcript user turns follow the same pattern: detected_language, total_results, user_interruption_flag. A few telephony fields (for example callStatus, setupTime) use camelCase — check the example payload above rather than assuming one convention everywhere.

Payload field reference

Return HTTP 2xx from your endpoint quickly and process the payload asynchronously. Key your handler on conversation_id to stay idempotent — the same call may be delivered more than once.
Pass clientReferenceId on Trigger Call to link webhook payloads back to your CRM record. For a Platform-normalized view of the same call, use conversation_id with Get Conversation Statistics.

Response

Success (200)

Errors

400 Bad Request - Validation error
403 Forbidden - Insufficient permissions (QA role)
404 Not Found - Agent not found or not accessible
409 Conflict - Agent name already taken
Always validate your ASR and TTS selections against the Agent Config API before updating. This ensures the selected provider/model combination supports all configured languages.
Save the requestId from every response. You will need it if you contact Gnani support to trace a specific request.

Authorizations

x-api-key
string
header
required

API key with 'agents' permission

Path Parameters

botId
string
required

Unique identifier of the agent

Body

application/json
botName
string
description
string
greetingMessage
string
endMessage
string
systemPrompt
string

Supports Jinja2 template variables, e.g. {{ customer_name }}

hasDynamicGreeting
boolean
dynamicInitialMessageConfig
object
botDetails
object
asrParams
object
llmParams
object
ttsParams
object
advanceSettings
object
languageSwitch
boolean
explicitLanguageSwitch
boolean
languageSwitchMode
enum<string>
Available options:
implicit,
explicit
minWordsForLangSwitch
integer
default:2
Required range: x >= 1
callTransferConfig
object
callTransferConfigStatus
boolean
preCall
object
enableVoiceMailDetection
boolean
voiceMailDetectionConfig
object
hasPostCallTrigger
boolean
postCallTriggerAPIConfig
object

Response

Agent updated successfully

status
string
Example:

"success"

requestId
string
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

message
string
response
object