Update Agent
Update an existing agent on the v1 API.
/v1 API reference and is the supported path for new integrations. See the migration guide for versioning guidance.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.
/agents2 update uses a separate body (UpdateAgents2BodyDto). Review the request schema for /v1/agents/{id} in the panel on this page before migrating.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 list of boosted keywords
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
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.
System prompt text for the agent
"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"
Prompt text used by the agent
"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"
Welcome message for the agent
"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 templates
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
Voice model ID to use for the agent
"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"
Response
Agent updated successfully.
Signed agent ID
"agent_2g7Xy3tY53gRlp"
Single_Prompt_Agent, Conversational_Flow_Agent Cascaded, Speech_To_Speech