Update Agent
Updates the specified draft version of an agent. version_number is required.
Managing functions via this endpoint:
- Pass agent_functions: [...] to replace the version's functions. The platform end_call function is always kept.
- Pass agent_functions: [] to remove every function except end_call.
- Omit agent_functions entirely to leave existing functions untouched.
Post-call analysis LLM:
- Pass post_call_analysis_llm_id, for example llm_A1B2C3D4E5F6G7, to set the LLM used for post-call field extraction.
- Pass null to clear it so the workspace default is used.
- Omit the field to leave it unchanged.
- It is stored on the version's existing post-call fields: it has no effect when there are none, a replaced post_call_analysis list gets new fields without it, and it is saved before the rest of the request is validated, so a rejected request can still have changed it.
Phone numbers are linked to the agent, not to a version. Manage them with /v1/agents/{agentId}/phone-numbers. Every version uses the agent's numbers, and inbound calls run on the latest published version.
While a batch is running on this agent, the request returns 409 Conflict with code AGENT_HAS_RUNNING_BATCH when it would change a published version in place (runtime fields; version_title and folder_id can still change) or change timezone or pipeline_type. Drafts stay editable and can be published. The running batch keeps dialing the version it was created with.
A published version cannot be edited. Runtime changes are blocked while a batch runs on the agent; edit and publish a new draft instead.
Null is ignored for end_call_on_hold_sec, language_default_message, version_title, reminder_message_content, llm_fallback_model and llm_fallback_delay_ms: the stored value is kept.
Request
- Base URL: https://api.dialnexa.com
- URL: https://api.dialnexa.com/v1/agents/{id}
- Auth: HTTP bearer
Path parameters
Agent ID
Request body
Example request
{
"reminder_message_interval": 10,
"voicemail_detection": true,
"voicemail_message": "Hi, please call us back at your convenience.",
"end_call_on_silence_sec": 20,
"end_call_on_hold_sec": 20,
"max_call_duration_sec": 600,
"ring_duration_sec": 30,
"version_number": 1,
"folder_id": "f5k2m8x1q9w3zp",
"pipeline_type": "Cascaded",
"title": "Customer Support Agent",
"version_title": "Version 1.1",
"description": "This agent handles customer support inquiries",
"timezone": "Asia/Kolkata",
"system_prompt_text": "You are a helpful customer support agent named Sarah.",
"language_id": "lang_en_in",
"llm_id": "llm_A1B2C3D4E5F6G7",
"llm_temperature": 1,
"voice_id": "voice_abc123",
"prompt_text": "Hello, how can I assist you today?",
"welcome_message": "Welcome to our service!",
"knowledge_base_ids": [
"kb_abc123",
"kb_def456"
],
"kb_max_chunks": 5,
"kb_min_score": 0.5,
"default_dynamic_variables": {
"firstName": "John",
"lastName": "Doe",
"courseType": "Math"
},
"llm_fallback_delay_ms": 200,
"llm_fallback_model": "llm_A1B2C3D4E5F6G7",
"voice_model_id": "vm4k2p9x7q1z3r",
"voice_speed": 1,
"voice_temperature": 1,
"agent_identity": "You are a helpful customer support agent named Sarah.",
"agent_background": "You have 5 years of experience in customer support and specialize in helping customers with technical issues.",
"post_call_analysis_llm_id": "llm_A1B2C3D4E5F6G7",
"pronunciations": [
{
"original_word": "Nexa",
"pronunciation_format": "Nek-sa",
"phonetic_pronunciation": "Nek-sa"
}
]
}Response
Agent updated successfully.
Example response
{
"statusCode": 200,
"message": "Success",
"data": {
"id": "agent_2g7Xy3tY53gRlp",
"current_version_number": "3",
"current_version": {
"version_number": "1",
"postcall_analysis": [
{
"llm_id": "llm_A1B2C3D4E5F6G7"
}
]
},
"versions": [
{
"version_number": "1",
"postcall_analysis": [
{
"llm_id": "llm_A1B2C3D4E5F6G7"
}
]
}
],
"organization_id": "o14XKPP84rt22g",
"inbound_phone_numbers": [
{
"id": "phn_abc123",
"phone_number": "9876543210",
"country_iso": "91"
}
],
"outbound_phone_numbers": [
{
"id": "phn_abc123",
"phone_number": "9876543210",
"country_iso": "91"
}
],
"running_batches": [
{
"id": "batch_2g7Xy3tY53gRlp"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.