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 API 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.
Set boost_dynamic_variables to true to append sanitized test-call or batch-recipient values to those recognition hints at call time. The configured terms keep priority, and existing agents remain opted out until this field is enabled.
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.
When functions are configured, the primary and fallback LLM must support tool calling. DialNexa forces predictive preprocessing off for that effective configuration.
For an IVR Agent, send ivr_menu only to a draft. Publish the IVR draft through this agent update operation. Do not use a direct version-publish route. Publishing validates the graph and renders every static prompt to cached audio before the version becomes available.
Publish Checks And Voice Tuning
Publishing requires a non-empty universal prompt for Single Prompt agents, a custom welcome message whenconversation_start_type is agent_defined, valid content in Conversational Flow nodes, and a transcriber compatible with the selected language. Drafts can remain incomplete while you edit.
Before publishing an IVR, read the target variables and set non-empty fallback_dynamic_variables on each Connect To Agent node. Check IVR references before publishing a target agent, and check changed targets before republishing an IVR.
PATCH accepts voice_speed from 0.25 to 4, voice_temperature from 0 to 2, voice_volume from -10 to 10, voice_pitch from -20 to 20, and llm_temperature from 0 to 2. Provider-specific controls can have narrower useful ranges. Values outside the API bounds return 400.
Validation Rules
The update request validates the effective draft configuration before saving.Check Prompt Health
Create and update responses includeprompt_health for Single Prompt and Speech to Speech agents: status, prompt_tokens, limit_tokens, system_prompt_reserved_tokens, limited_by, and comment. Other types report not_applicable. Counts are estimates, with known dynamic defaults expanded and system instructions reserved. Read prompt size limits before changing models or adding large defaults.
An enforced over-limit prompt returns 400 on creation, publishing, or updates that change the prompt, defaults, system instructions, model, fallback selection, or pipeline. Unrelated updates to an existing oversized agent can succeed while reporting over_ceiling. Reduce the prompt or select a suitable model before publishing.
Enabled fallback LLM and STT choices must differ from their primary model or transcriber. An invalid pair returns 400. The automatically provided End Call behavior does not count as a callable tool for predictive preprocessing or model tool-compatibility checks.
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"
When true, sanitized values from test-call or batch-recipient dynamic variables are appended to boosted_keywords for that call. Configured terms keep priority. Applies to supported Deepgram and Soniox primary and fallback transcribers.
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. If omitted, DialNexa generates one automatically. Maximum 150 characters.
150"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. Template variables such as {{customer_name}} are rejected with 400; use prompt_text for dynamic content.
"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"
Llm temperature from 0 to 2. Values outside this range return 400.
0 <= x <= 21
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
200
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
IVR menu graph for IVR_Agent. Prompt audio is rendered and cached when the agent is published.
Voice speed from 0.25 to 4. Values outside this range return 400.
0.25 <= x <= 41
Voice temperature from 0 to 2. Values outside this range return 400.
0 <= x <= 21
Voice volume from -10 to 10. Values outside this range return 400.
-10 <= x <= 100
Voice pitch from -20 to 20. Values outside this range return 400.
-20 <= x <= 200
Reminder text spoken after reminder_message_interval seconds of silence. Null/empty falls back to the language-detected default.
150Noise suppression strength 0-4 (higher = stronger)
0 <= x <= 4