Update Agent
Update an existing agent on the v1 API.
When to use this
- Prompt iteration: change
prompt_textorsystem_prompt_texton a draft version while tuning agent behavior. - Rewiring: point the agent at a different voice, LLM, transcriber, phone number, or knowledge base without recreating it.
- Publishing: set
is_publishedto promote a draft version once it is ready for production traffic. - Fallback configuration: enable LLM or STT fallbacks so calls survive a provider outage (see the sections below).
400 Bad Request means a field failed validation; 404 Not Found means the agent does not exist in this workspace. See Errors for the standard error format.
Minimal publish request
Post-Call Analysis LLM
Usepost_call_analysis_llm_id on this endpoint to set or clear the LLM used for post-call field extraction on a draft version.
version_number with the request. Published versions cannot be edited, except when publishing a draft.
Publishing And Phone Number Assignment
Phone number assignment becomes live only when you publish a draft. If you sendinbound_phone_number_id or outbound_phone_number_id, include is_published: true in the same request so DialNexa can claim the number for that published version. Sending a phone number ID without is_published: true is ignored for live routing.
Use an empty string to detach an inbound or outbound phone number while publishing. For outbound numbers, DialNexa can return 409 Conflict if changing or removing the number would break active workflows that still use that number in Voice Call nodes. Pause those workflows first, then retry.
Fallback STT
Usefallback_stt_enabled, stt_fallback_transcriber_id, and stt_fallback_wait_ms to configure fallback transcription. Pick the fallback transcriber ID from List Fallback Transcribers, then pass the selected ID here. The fallback transcriber ID must differ from the effective primary transcriber_id.
Speech And Model Settings
Useboosted_keywords when a cascaded Deepgram or Soniox agent needs recognition hints for names, products, localities, or other uncommon terms. Send a comma-separated string. Terms can contain letters, numbers, and spaces only, with up to 100 normalized terms, 50 characters per term, and 2,000 total characters.
Use predictive_preprocessing_enabled to pre-generate likely next replies between turns. Use prompt_caching_enabled only when DialNexa has enabled Prompt Caching for your workspace. If the feature is not enabled, the API returns 403 Forbidden.
Validation Rules
The update request validates the effective draft configuration before saving.Verify the result
Fetch the agent and confirm the intended version is published. If the update timed out, read the agent before repeating the request, especially when publishing or assigning a phone number.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Agent ID
"agent_2g7Xy3tY53gRlp"
Body
Version number of the agent to update
1
Background sound file or identifier
Volume of background sound (0 to 2)
0 <= x <= 2Enable or disable ambient noise playback on the call
Responsiveness level from 0 to 1.
0 <= x <= 5Interruption sensitivity level (0 to 1)
0 <= x <= 1How eagerly the agent responds (0 to 1). Only applied when transcriber is Soniox.
0 <= x <= 1Enable or disable backchanneling
Frequency of backchannel responses
0 <= x <= 10.5
Mode for transcription
optimize_for_speed, optimize_for_accuracy Mode for denoising audio input
remove_noise, remove_noise_and_speech Enable or disable speech normalization
Enable or disable transcript formatting
Comma-separated list of backchannel keywords
Comma-separated recognition hints for supported Deepgram and Soniox transcribers. Terms can contain letters, numbers, and spaces only. The normalized list supports up to 100 terms, 50 characters per term, and 2000 total characters.
2000"DialNexa, Nexa Prime, customer success"
Interval between reminder messages (in seconds)
Frequency of reminder messages
ID of the transcriber catalog entry
Enable parallel fallback STT for this agent
Fallback STT transcriber catalog entry. Required when fallback_stt_enabled is true and must differ from the effective primary transcriber_id.
Milliseconds to wait for primary STT after fallback finalizes first
x >= 0Enable TTS audio caching for this agent
ID of the folder this agent belongs to
"fld_abc123xyz789"
Pipeline subtype for Single_Prompt_Agent. Cascaded = ASR→LLM→TTS pipeline. Speech_To_Speech = direct speech model.
Cascaded, Speech_To_Speech "Cascaded"
Title of the agent (max 70 characters)
70"Customer Support Agent"
Version title (optional, will be auto-generated if not provided, max 35 characters)
35"Version 1.1"
Description of the agent
"This agent handles customer support inquiries"
Timezone for the agent
"Asia/Kolkata"
ID of the inbound phone number to use for this agent. Must be an existing phone number ID in your organization. Applied to live inbound routing only when is_published: true is sent in the same request. Pass an empty string to detach while publishing.
Static system instructions for the agent. Use prompt_text for dynamic content via {{variable}} syntax.
"You are a helpful customer support agent named Sarah."
ID of the outbound phone number to use for this agent. Must be an existing phone number ID in your organization. Applied to live outbound routing only when is_published: true is sent in the same request. Pass an empty string to detach while publishing. Active workflows using the number can cause a 409 conflict.
ID of the language the agent speaks
"lng_59a9ce4a91334686933a"
ID of the LLM associated with the agent
"A1B2C3D4E5F6G7"
temperature value for the LLM which controls how creative the model responses are
0.1
ID of the voice used by the agent
"VOICE123456789"
ID of the webhook associated with the agent
"wh_12345678901234"
Main instructions for the agent. Supports Handlebars template syntax such as {{variable}} for dynamic content. Must be valid Handlebars template text.
"Hello, how can I assist you today?"
Node positions for Conversational_Flow_Agent type (stored as JSON string)
"{\"id\" : 1, \"positions\" : {\"x\": 100, \"y\": 200}}"
Who starts the conversation
user, agent_dynamic, agent_defined "user"
Opening message spoken by the agent at the start of the call. Supports Handlebars template syntax such as {{variable}} and must be valid Handlebars template text.
"Welcome to our service!"
Whether the agent allows interruptions
true
Whether the reponse should adhere to a structure or not
true
Instructions for JSON output
IDs of the knowledge bases attached to this agent version
Maximum number of RAG chunks to fetch (1-10)
1 <= x <= 105
Minimum similarity score threshold for RAG results (0-1)
0 <= x <= 10.5
Publish this draft version. When true, phone number IDs in the same request are claimed for live routing.
false
Whether to allow updating a published version
false
Default values for dynamic variables used in Handlebars templates. For call-transfer flows, agent_transfer_destinations accepts up to 7 pipe-separated phone numbers. Each number must use US +1 or India +91 and exactly 10 digits after the country code.
Enable fallback LLM for this agent
false
Milliseconds to wait before triggering the fallback LLM
500
ID (llms.id) of the LLM to use as fallback
"abc123xyz789ab"
Enable predictive preprocessing for this agent version
false
Speech synthesis model for the selected voice. The model must belong to the same provider as voice_id. Omit this field when you want DialNexa to apply the recommended model. For ElevenLabs voices, use eleven_flash_v2_5 where supported. To find supported models for one voice, call GET /v1/voices/{voice_id}/voice-models.
"254"
Agent identity (required for Conversational_Flow_Agent type on update)
"You are a helpful customer support agent named Sarah."
Agent background (required for Conversational_Flow_Agent type on update)
"You have 5 years of experience in customer support and specialize in helping customers with technical issues."
Post call analysis configuration
Post call analysis configuration (alternative field name)
Agent functions - full replace for this version. Pass empty array to clear all.
LLM ID used for post-call analysis extraction. Pass a signed LLM ID such as llm_A1B2C3D4E5F6G7 to set an override, null to clear it, or omit the field to leave the existing setting unchanged.
"llm_A1B2C3D4E5F6G7"
Enable OpenAI Prompt Caching for this agent version. DialNexa must enable this feature for your workspace.
false
Response
Agent updated successfully.
Signed agent ID
"agent_2g7Xy3tY53gRlp"
Single_Prompt_Agent, Conversational_Flow_Agent Cascaded, Speech_To_Speech