Update Agent
Update one or more fields on an existing agent. Only fields you include are changed.
curl --request PATCH \
--url https://api.dialnexa.com/agents2/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"title": "Customer Support Agent",
"llm": {
"id": "llm_xxxxx",
"settings": {
"temperature": 0.1,
"structured_output": true
},
"fallback": {
"fallback_llm_enabled": false,
"llm_fallback_model": "abc123xyz789ab",
"fall_back_llm_id": "llm_abc123xyz789ab",
"llm_fallback_delay_ms": 500
}
},
"fallback_llm_enabled": false,
"llm_fallback_model": "abc123xyz789ab",
"llm_fallback_delay_ms": 500,
"analysis": {
"postcall_analysis": [
{
"field_name": "customer_satisfaction",
"field_type": "NUMBER",
"field_description": "Customer satisfaction rating"
}
]
},
"version_number": 1,
"is_published": false,
"update_deployment": false
}
'import requests
url = "https://api.dialnexa.com/agents2/{id}"
payload = {
"title": "Customer Support Agent",
"llm": {
"id": "llm_xxxxx",
"settings": {
"temperature": 0.1,
"structured_output": True
},
"fallback": {
"fallback_llm_enabled": False,
"llm_fallback_model": "abc123xyz789ab",
"fall_back_llm_id": "llm_abc123xyz789ab",
"llm_fallback_delay_ms": 500
}
},
"fallback_llm_enabled": False,
"llm_fallback_model": "abc123xyz789ab",
"llm_fallback_delay_ms": 500,
"analysis": { "postcall_analysis": [
{
"field_name": "customer_satisfaction",
"field_type": "NUMBER",
"field_description": "Customer satisfaction rating"
}
] },
"version_number": 1,
"is_published": False,
"update_deployment": False
}
headers = {
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Customer Support Agent',
llm: {
id: 'llm_xxxxx',
settings: {temperature: 0.1, structured_output: true},
fallback: {
fallback_llm_enabled: false,
llm_fallback_model: 'abc123xyz789ab',
fall_back_llm_id: 'llm_abc123xyz789ab',
llm_fallback_delay_ms: 500
}
},
fallback_llm_enabled: false,
llm_fallback_model: 'abc123xyz789ab',
llm_fallback_delay_ms: 500,
analysis: {
postcall_analysis: [
{
field_name: 'customer_satisfaction',
field_type: 'NUMBER',
field_description: 'Customer satisfaction rating'
}
]
},
version_number: 1,
is_published: false,
update_deployment: false
})
};
fetch('https://api.dialnexa.com/agents2/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dialnexa.com/agents2/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Customer Support Agent',
'llm' => [
'id' => 'llm_xxxxx',
'settings' => [
'temperature' => 0.1,
'structured_output' => true
],
'fallback' => [
'fallback_llm_enabled' => false,
'llm_fallback_model' => 'abc123xyz789ab',
'fall_back_llm_id' => 'llm_abc123xyz789ab',
'llm_fallback_delay_ms' => 500
]
],
'fallback_llm_enabled' => false,
'llm_fallback_model' => 'abc123xyz789ab',
'llm_fallback_delay_ms' => 500,
'analysis' => [
'postcall_analysis' => [
[
'field_name' => 'customer_satisfaction',
'field_type' => 'NUMBER',
'field_description' => 'Customer satisfaction rating'
]
]
],
'version_number' => 1,
'is_published' => false,
'update_deployment' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-organization-id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dialnexa.com/agents2/{id}"
payload := strings.NewReader("{\n \"title\": \"Customer Support Agent\",\n \"llm\": {\n \"id\": \"llm_xxxxx\",\n \"settings\": {\n \"temperature\": 0.1,\n \"structured_output\": true\n },\n \"fallback\": {\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"fall_back_llm_id\": \"llm_abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500\n }\n },\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500,\n \"analysis\": {\n \"postcall_analysis\": [\n {\n \"field_name\": \"customer_satisfaction\",\n \"field_type\": \"NUMBER\",\n \"field_description\": \"Customer satisfaction rating\"\n }\n ]\n },\n \"version_number\": 1,\n \"is_published\": false,\n \"update_deployment\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.dialnexa.com/agents2/{id}")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Customer Support Agent\",\n \"llm\": {\n \"id\": \"llm_xxxxx\",\n \"settings\": {\n \"temperature\": 0.1,\n \"structured_output\": true\n },\n \"fallback\": {\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"fall_back_llm_id\": \"llm_abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500\n }\n },\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500,\n \"analysis\": {\n \"postcall_analysis\": [\n {\n \"field_name\": \"customer_satisfaction\",\n \"field_type\": \"NUMBER\",\n \"field_description\": \"Customer satisfaction rating\"\n }\n ]\n },\n \"version_number\": 1,\n \"is_published\": false,\n \"update_deployment\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dialnexa.com/agents2/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Customer Support Agent\",\n \"llm\": {\n \"id\": \"llm_xxxxx\",\n \"settings\": {\n \"temperature\": 0.1,\n \"structured_output\": true\n },\n \"fallback\": {\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"fall_back_llm_id\": \"llm_abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500\n }\n },\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500,\n \"analysis\": {\n \"postcall_analysis\": [\n {\n \"field_name\": \"customer_satisfaction\",\n \"field_type\": \"NUMBER\",\n \"field_description\": \"Customer satisfaction rating\"\n }\n ]\n },\n \"version_number\": 1,\n \"is_published\": false,\n \"update_deployment\": false\n}"
response = http.request(request)
puts response.read_body{
"number": 0,
"is_published": false,
"llm": {
"id": "llm_xxxxx",
"settings": {
"temperature": 0.1,
"structured_output": true
},
"fallback": {
"fallback_llm_enabled": false,
"llm_fallback_model": "abc123xyz789ab",
"fall_back_llm_id": "llm_abc123xyz789ab",
"llm_fallback_delay_ms": 500
}
},
"fallback_llm_enabled": false,
"llm_fallback_model": "llm_abc123xyz789ab",
"fall_back_llm_id": "llm_abc123xyz789ab",
"llm_fallback_delay_ms": 500,
"transcriber_id": "tr0deepnova3xx",
"analysis": {
"postcall_analysis": [
{
"field_name": "customer_satisfaction",
"field_type": "NUMBER",
"field_description": "Customer satisfaction rating"
}
]
}
}/v1 version for new integrations. This endpoint remains available for existing integrations until then.Endpoint
PATCH /agents2/{id}
This page uses Mintlify OpenAPI rendering, including the API tester/runner, request schema, and response schema from the spec.
Updating Pipeline And Speech Settings
Single prompt agents can use either the standardCascaded pipeline or the Speech_To_Speech pipeline. Changing pipeline_type changes which controls apply to the agent version:
| Field | Applies to | Behavior |
|---|---|---|
pipeline_type | Single prompt agents | Cascaded keeps separate transcriber, LLM, and voice controls. Speech_To_Speech uses a realtime speech model. |
speech.transcriber_id | Cascaded agents | Selects the primary STT provider. |
speech.fallback_stt_enabled | Cascaded agents | Enables backup STT. Set speech.stt_fallback_transcriber_id when this is true. |
speech.audio_cache_enabled | Cascaded agents | Enables cached TTS for repeated phrases. Speech to Speech agents ignore this setting. |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
RSA encrypted organization ID (base64 format)
"BASE64_ENCRYPTED_ORG_ID_HERE"
Path Parameters
ID of the agent
Body
Grouped request body. Provide version_number or current_version.number. Fallback LLM: llm.fallback.fallback_llm_enabled + llm.fallback.llm_fallback_model. PCA: analysis.postcall_analysis.
"Customer Support Agent"
Show child attributes
Show child attributes
Enable fallback LLM (flat alias; prefer llm.fallback.fallback_llm_enabled)
false
Fallback LLM id (flat alias; prefer llm.fallback.llm_fallback_model)
"abc123xyz789ab"
Fallback delay ms (flat alias; prefer llm.fallback.llm_fallback_delay_ms)
500
Post-call analysis (PCA) fields for the agent version
Show child attributes
Show child attributes
Agent version number to update
1
Publish this agent version
false
Allow updating an already-published version
false
Response
Agent updated; current_version includes llm.fallback and flat fallback fields
0
false
Show child attributes
Show child attributes
false
"llm_abc123xyz789ab"
"llm_abc123xyz789ab"
500
"tr0deepnova3xx"
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.dialnexa.com/agents2/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"title": "Customer Support Agent",
"llm": {
"id": "llm_xxxxx",
"settings": {
"temperature": 0.1,
"structured_output": true
},
"fallback": {
"fallback_llm_enabled": false,
"llm_fallback_model": "abc123xyz789ab",
"fall_back_llm_id": "llm_abc123xyz789ab",
"llm_fallback_delay_ms": 500
}
},
"fallback_llm_enabled": false,
"llm_fallback_model": "abc123xyz789ab",
"llm_fallback_delay_ms": 500,
"analysis": {
"postcall_analysis": [
{
"field_name": "customer_satisfaction",
"field_type": "NUMBER",
"field_description": "Customer satisfaction rating"
}
]
},
"version_number": 1,
"is_published": false,
"update_deployment": false
}
'import requests
url = "https://api.dialnexa.com/agents2/{id}"
payload = {
"title": "Customer Support Agent",
"llm": {
"id": "llm_xxxxx",
"settings": {
"temperature": 0.1,
"structured_output": True
},
"fallback": {
"fallback_llm_enabled": False,
"llm_fallback_model": "abc123xyz789ab",
"fall_back_llm_id": "llm_abc123xyz789ab",
"llm_fallback_delay_ms": 500
}
},
"fallback_llm_enabled": False,
"llm_fallback_model": "abc123xyz789ab",
"llm_fallback_delay_ms": 500,
"analysis": { "postcall_analysis": [
{
"field_name": "customer_satisfaction",
"field_type": "NUMBER",
"field_description": "Customer satisfaction rating"
}
] },
"version_number": 1,
"is_published": False,
"update_deployment": False
}
headers = {
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Customer Support Agent',
llm: {
id: 'llm_xxxxx',
settings: {temperature: 0.1, structured_output: true},
fallback: {
fallback_llm_enabled: false,
llm_fallback_model: 'abc123xyz789ab',
fall_back_llm_id: 'llm_abc123xyz789ab',
llm_fallback_delay_ms: 500
}
},
fallback_llm_enabled: false,
llm_fallback_model: 'abc123xyz789ab',
llm_fallback_delay_ms: 500,
analysis: {
postcall_analysis: [
{
field_name: 'customer_satisfaction',
field_type: 'NUMBER',
field_description: 'Customer satisfaction rating'
}
]
},
version_number: 1,
is_published: false,
update_deployment: false
})
};
fetch('https://api.dialnexa.com/agents2/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dialnexa.com/agents2/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Customer Support Agent',
'llm' => [
'id' => 'llm_xxxxx',
'settings' => [
'temperature' => 0.1,
'structured_output' => true
],
'fallback' => [
'fallback_llm_enabled' => false,
'llm_fallback_model' => 'abc123xyz789ab',
'fall_back_llm_id' => 'llm_abc123xyz789ab',
'llm_fallback_delay_ms' => 500
]
],
'fallback_llm_enabled' => false,
'llm_fallback_model' => 'abc123xyz789ab',
'llm_fallback_delay_ms' => 500,
'analysis' => [
'postcall_analysis' => [
[
'field_name' => 'customer_satisfaction',
'field_type' => 'NUMBER',
'field_description' => 'Customer satisfaction rating'
]
]
],
'version_number' => 1,
'is_published' => false,
'update_deployment' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-organization-id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dialnexa.com/agents2/{id}"
payload := strings.NewReader("{\n \"title\": \"Customer Support Agent\",\n \"llm\": {\n \"id\": \"llm_xxxxx\",\n \"settings\": {\n \"temperature\": 0.1,\n \"structured_output\": true\n },\n \"fallback\": {\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"fall_back_llm_id\": \"llm_abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500\n }\n },\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500,\n \"analysis\": {\n \"postcall_analysis\": [\n {\n \"field_name\": \"customer_satisfaction\",\n \"field_type\": \"NUMBER\",\n \"field_description\": \"Customer satisfaction rating\"\n }\n ]\n },\n \"version_number\": 1,\n \"is_published\": false,\n \"update_deployment\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.dialnexa.com/agents2/{id}")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Customer Support Agent\",\n \"llm\": {\n \"id\": \"llm_xxxxx\",\n \"settings\": {\n \"temperature\": 0.1,\n \"structured_output\": true\n },\n \"fallback\": {\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"fall_back_llm_id\": \"llm_abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500\n }\n },\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500,\n \"analysis\": {\n \"postcall_analysis\": [\n {\n \"field_name\": \"customer_satisfaction\",\n \"field_type\": \"NUMBER\",\n \"field_description\": \"Customer satisfaction rating\"\n }\n ]\n },\n \"version_number\": 1,\n \"is_published\": false,\n \"update_deployment\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dialnexa.com/agents2/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Customer Support Agent\",\n \"llm\": {\n \"id\": \"llm_xxxxx\",\n \"settings\": {\n \"temperature\": 0.1,\n \"structured_output\": true\n },\n \"fallback\": {\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"fall_back_llm_id\": \"llm_abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500\n }\n },\n \"fallback_llm_enabled\": false,\n \"llm_fallback_model\": \"abc123xyz789ab\",\n \"llm_fallback_delay_ms\": 500,\n \"analysis\": {\n \"postcall_analysis\": [\n {\n \"field_name\": \"customer_satisfaction\",\n \"field_type\": \"NUMBER\",\n \"field_description\": \"Customer satisfaction rating\"\n }\n ]\n },\n \"version_number\": 1,\n \"is_published\": false,\n \"update_deployment\": false\n}"
response = http.request(request)
puts response.read_body{
"number": 0,
"is_published": false,
"llm": {
"id": "llm_xxxxx",
"settings": {
"temperature": 0.1,
"structured_output": true
},
"fallback": {
"fallback_llm_enabled": false,
"llm_fallback_model": "abc123xyz789ab",
"fall_back_llm_id": "llm_abc123xyz789ab",
"llm_fallback_delay_ms": 500
}
},
"fallback_llm_enabled": false,
"llm_fallback_model": "llm_abc123xyz789ab",
"fall_back_llm_id": "llm_abc123xyz789ab",
"llm_fallback_delay_ms": 500,
"transcriber_id": "tr0deepnova3xx",
"analysis": {
"postcall_analysis": [
{
"field_name": "customer_satisfaction",
"field_type": "NUMBER",
"field_description": "Customer satisfaction rating"
}
]
}
}