Update agent
curl --request PUT \
--url https://api.nixflex.com/v1/agents/{agent_id}import requests
url = "https://api.nixflex.com/v1/agents/{agent_id}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.nixflex.com/v1/agents/{agent_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.nixflex.com/v1/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nixflex.com/v1/agents/{agent_id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.nixflex.com/v1/agents/{agent_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixflex.com/v1/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyAgents
Update agent
PUT /v1/agents/:id
PUT
/
v1
/
agents
/
{agent_id}
Update agent
curl --request PUT \
--url https://api.nixflex.com/v1/agents/{agent_id}import requests
url = "https://api.nixflex.com/v1/agents/{agent_id}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.nixflex.com/v1/agents/{agent_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.nixflex.com/v1/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nixflex.com/v1/agents/{agent_id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.nixflex.com/v1/agents/{agent_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixflex.com/v1/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyUpdates an agent’s configuration. Only include fields you want to change — omitted fields keep their current values.
Request
curl -X PUT https://api.nixflex.com/v1/agents/agent_125207e452f8714a \
-H "Authorization: Bearer KEY_ID:KEY_SECRET" \
-H "Content-Type: application/json" \
-d '{
"welcome_message": "Hi, Acme Dental, how may I help you today?",
"response_length": "short"
}'
Body parameters
Any field from Create agent can be updated. Pass only the fields you want to change. Field behaviour worth knowing| Field | Behaviour on update |
|---|---|
speaking_rate | Clamped to the supported range rather than rejected, so 9 is stored as the maximum. Send null to clear it and go back to normal speed - null is not the same as 1. See Voices. |
dtmf_enabled | Three-state. true and false are explicit; null means not set, which lets a phone number’s own setting decide. |
require_booking_confirmation | true makes the engine read the appointment back and wait for a clear yes before any calendar write. A number can override it. See Booking confirmation. |
system_prompt | Maximum 16000 characters, about 4000 tokens. Over that the whole update is rejected with prompt_too_long. |
voice_speed | Accepted and saved, but nothing reads it. Use speaking_rate. |
boosted_keywords | Comma-separated words to boost in transcription - staff names, treatments, products, place names. Keep it under 50. The API does not reject a longer list, but too many terms are rejected at transcription time and the agent hears nothing for that call. |
incall_sms_enabled | Turns texting during a call on or off, and with it the automatic booking confirmation text. Off means no text is sent whatever the prompt says. See In-call SMS. |
func_send_sms, func_cold_transfer | Accepted and saved, but not enforced - the agent texts and transfers regardless. Control them in your prompt. See Create agent. |
Fields not listed in Create agent are ignored rather
than rejected. If a setting is not taking effect, check the field name against that
page first - an unrecognised name returns
200 and changes nothing.Response
200 OK — returns the updated agent object.
Behaviour
- Active calls are unaffected. Updating an agent while a call is in progress doesn’t change behaviour mid-call. New calls use the new config.
agent_idandapi_key_idare immutable. Trying to change them is ignored.- No partial validation. If you submit an invalid value for any field, the whole update fails.
Errors
| Code | Cause |
|---|---|
agent_not_found | ID doesn’t exist or isn’t yours |
prompt_too_long | New system_prompt exceeds 16000 characters |
invalid_voice_id | Voice not supported |