curl --request PUT \
--url https://api.kupe.in/api/v1/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"agent": {
"name": "Renamed Agent",
"first_response_message": "Hi, thanks for calling Acme. How can I help today?"
},
"agent_model_config": {
"model_name": "gpt-4.1-mini",
"system_prompt": "Updated prompt."
},
"agent_specific_config": {
"auto_terminate_call": true,
"end_of_speech_timeout": 1.2,
"inbound_transfer_routes": [
{
"route_id": "billing",
"display_name": "Billing desk",
"enabled": true,
"condition_when_to_transfer": "Caller asks for a human or billing specialist.",
"phone_number": "+919876543210"
}
]
}
}
'import requests
url = "https://api.kupe.in/api/v1/agents/{agent_id}"
payload = {
"agent": {
"name": "Renamed Agent",
"first_response_message": "Hi, thanks for calling Acme. How can I help today?"
},
"agent_model_config": {
"model_name": "gpt-4.1-mini",
"system_prompt": "Updated prompt."
},
"agent_specific_config": {
"auto_terminate_call": True,
"end_of_speech_timeout": 1.2,
"inbound_transfer_routes": [
{
"route_id": "billing",
"display_name": "Billing desk",
"enabled": True,
"condition_when_to_transfer": "Caller asks for a human or billing specialist.",
"phone_number": "+919876543210"
}
]
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent: {
name: 'Renamed Agent',
first_response_message: 'Hi, thanks for calling Acme. How can I help today?'
},
agent_model_config: {model_name: 'gpt-4.1-mini', system_prompt: 'Updated prompt.'},
agent_specific_config: {
auto_terminate_call: true,
end_of_speech_timeout: 1.2,
inbound_transfer_routes: [
{
route_id: 'billing',
display_name: 'Billing desk',
enabled: true,
condition_when_to_transfer: 'Caller asks for a human or billing specialist.',
phone_number: '+919876543210'
}
]
}
})
};
fetch('https://api.kupe.in/api/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.kupe.in/api/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",
CURLOPT_POSTFIELDS => json_encode([
'agent' => [
'name' => 'Renamed Agent',
'first_response_message' => 'Hi, thanks for calling Acme. How can I help today?'
],
'agent_model_config' => [
'model_name' => 'gpt-4.1-mini',
'system_prompt' => 'Updated prompt.'
],
'agent_specific_config' => [
'auto_terminate_call' => true,
'end_of_speech_timeout' => 1.2,
'inbound_transfer_routes' => [
[
'route_id' => 'billing',
'display_name' => 'Billing desk',
'enabled' => true,
'condition_when_to_transfer' => 'Caller asks for a human or billing specialist.',
'phone_number' => '+919876543210'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.kupe.in/api/v1/agents/{agent_id}"
payload := strings.NewReader("{\n \"agent\": {\n \"name\": \"Renamed Agent\",\n \"first_response_message\": \"Hi, thanks for calling Acme. How can I help today?\"\n },\n \"agent_model_config\": {\n \"model_name\": \"gpt-4.1-mini\",\n \"system_prompt\": \"Updated prompt.\"\n },\n \"agent_specific_config\": {\n \"auto_terminate_call\": true,\n \"end_of_speech_timeout\": 1.2,\n \"inbound_transfer_routes\": [\n {\n \"route_id\": \"billing\",\n \"display_name\": \"Billing desk\",\n \"enabled\": true,\n \"condition_when_to_transfer\": \"Caller asks for a human or billing specialist.\",\n \"phone_number\": \"+919876543210\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api.kupe.in/api/v1/agents/{agent_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent\": {\n \"name\": \"Renamed Agent\",\n \"first_response_message\": \"Hi, thanks for calling Acme. How can I help today?\"\n },\n \"agent_model_config\": {\n \"model_name\": \"gpt-4.1-mini\",\n \"system_prompt\": \"Updated prompt.\"\n },\n \"agent_specific_config\": {\n \"auto_terminate_call\": true,\n \"end_of_speech_timeout\": 1.2,\n \"inbound_transfer_routes\": [\n {\n \"route_id\": \"billing\",\n \"display_name\": \"Billing desk\",\n \"enabled\": true,\n \"condition_when_to_transfer\": \"Caller asks for a human or billing specialist.\",\n \"phone_number\": \"+919876543210\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kupe.in/api/v1/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent\": {\n \"name\": \"Renamed Agent\",\n \"first_response_message\": \"Hi, thanks for calling Acme. How can I help today?\"\n },\n \"agent_model_config\": {\n \"model_name\": \"gpt-4.1-mini\",\n \"system_prompt\": \"Updated prompt.\"\n },\n \"agent_specific_config\": {\n \"auto_terminate_call\": true,\n \"end_of_speech_timeout\": 1.2,\n \"inbound_transfer_routes\": [\n {\n \"route_id\": \"billing\",\n \"display_name\": \"Billing desk\",\n \"enabled\": true,\n \"condition_when_to_transfer\": \"Caller asks for a human or billing specialist.\",\n \"phone_number\": \"+919876543210\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true
},
"configurations": {},
"validation_status": "valid"
}{
"detail": "Forbidden: API Key does not have required scopes"
}{
"detail": "Forbidden: API Key does not have required scopes"
}{
"detail": "Forbidden: API Key does not have required scopes"
}{
"detail": "Forbidden: API Key does not have required scopes"
}{
"detail": "Forbidden: API Key does not have required scopes"
}Update agent
Full URL: PUT https://api.kupe.in/api/v1/agents/{agent_id} (optional ?force_update=true)
Send partial AgentUpdateRequest fields. Active agents may require force_update=true on dashboard flows.
To change behavior only, send agent_specific_config with the keys to update — values are merged onto the stored
configuration (other keys are unchanged).
curl --request PUT \
--url https://api.kupe.in/api/v1/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"agent": {
"name": "Renamed Agent",
"first_response_message": "Hi, thanks for calling Acme. How can I help today?"
},
"agent_model_config": {
"model_name": "gpt-4.1-mini",
"system_prompt": "Updated prompt."
},
"agent_specific_config": {
"auto_terminate_call": true,
"end_of_speech_timeout": 1.2,
"inbound_transfer_routes": [
{
"route_id": "billing",
"display_name": "Billing desk",
"enabled": true,
"condition_when_to_transfer": "Caller asks for a human or billing specialist.",
"phone_number": "+919876543210"
}
]
}
}
'import requests
url = "https://api.kupe.in/api/v1/agents/{agent_id}"
payload = {
"agent": {
"name": "Renamed Agent",
"first_response_message": "Hi, thanks for calling Acme. How can I help today?"
},
"agent_model_config": {
"model_name": "gpt-4.1-mini",
"system_prompt": "Updated prompt."
},
"agent_specific_config": {
"auto_terminate_call": True,
"end_of_speech_timeout": 1.2,
"inbound_transfer_routes": [
{
"route_id": "billing",
"display_name": "Billing desk",
"enabled": True,
"condition_when_to_transfer": "Caller asks for a human or billing specialist.",
"phone_number": "+919876543210"
}
]
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent: {
name: 'Renamed Agent',
first_response_message: 'Hi, thanks for calling Acme. How can I help today?'
},
agent_model_config: {model_name: 'gpt-4.1-mini', system_prompt: 'Updated prompt.'},
agent_specific_config: {
auto_terminate_call: true,
end_of_speech_timeout: 1.2,
inbound_transfer_routes: [
{
route_id: 'billing',
display_name: 'Billing desk',
enabled: true,
condition_when_to_transfer: 'Caller asks for a human or billing specialist.',
phone_number: '+919876543210'
}
]
}
})
};
fetch('https://api.kupe.in/api/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.kupe.in/api/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",
CURLOPT_POSTFIELDS => json_encode([
'agent' => [
'name' => 'Renamed Agent',
'first_response_message' => 'Hi, thanks for calling Acme. How can I help today?'
],
'agent_model_config' => [
'model_name' => 'gpt-4.1-mini',
'system_prompt' => 'Updated prompt.'
],
'agent_specific_config' => [
'auto_terminate_call' => true,
'end_of_speech_timeout' => 1.2,
'inbound_transfer_routes' => [
[
'route_id' => 'billing',
'display_name' => 'Billing desk',
'enabled' => true,
'condition_when_to_transfer' => 'Caller asks for a human or billing specialist.',
'phone_number' => '+919876543210'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.kupe.in/api/v1/agents/{agent_id}"
payload := strings.NewReader("{\n \"agent\": {\n \"name\": \"Renamed Agent\",\n \"first_response_message\": \"Hi, thanks for calling Acme. How can I help today?\"\n },\n \"agent_model_config\": {\n \"model_name\": \"gpt-4.1-mini\",\n \"system_prompt\": \"Updated prompt.\"\n },\n \"agent_specific_config\": {\n \"auto_terminate_call\": true,\n \"end_of_speech_timeout\": 1.2,\n \"inbound_transfer_routes\": [\n {\n \"route_id\": \"billing\",\n \"display_name\": \"Billing desk\",\n \"enabled\": true,\n \"condition_when_to_transfer\": \"Caller asks for a human or billing specialist.\",\n \"phone_number\": \"+919876543210\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api.kupe.in/api/v1/agents/{agent_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent\": {\n \"name\": \"Renamed Agent\",\n \"first_response_message\": \"Hi, thanks for calling Acme. How can I help today?\"\n },\n \"agent_model_config\": {\n \"model_name\": \"gpt-4.1-mini\",\n \"system_prompt\": \"Updated prompt.\"\n },\n \"agent_specific_config\": {\n \"auto_terminate_call\": true,\n \"end_of_speech_timeout\": 1.2,\n \"inbound_transfer_routes\": [\n {\n \"route_id\": \"billing\",\n \"display_name\": \"Billing desk\",\n \"enabled\": true,\n \"condition_when_to_transfer\": \"Caller asks for a human or billing specialist.\",\n \"phone_number\": \"+919876543210\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kupe.in/api/v1/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent\": {\n \"name\": \"Renamed Agent\",\n \"first_response_message\": \"Hi, thanks for calling Acme. How can I help today?\"\n },\n \"agent_model_config\": {\n \"model_name\": \"gpt-4.1-mini\",\n \"system_prompt\": \"Updated prompt.\"\n },\n \"agent_specific_config\": {\n \"auto_terminate_call\": true,\n \"end_of_speech_timeout\": 1.2,\n \"inbound_transfer_routes\": [\n {\n \"route_id\": \"billing\",\n \"display_name\": \"Billing desk\",\n \"enabled\": true,\n \"condition_when_to_transfer\": \"Caller asks for a human or billing specialist.\",\n \"phone_number\": \"+919876543210\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true
},
"configurations": {},
"validation_status": "valid"
}{
"detail": "Forbidden: API Key does not have required scopes"
}{
"detail": "Forbidden: API Key does not have required scopes"
}{
"detail": "Forbidden: API Key does not have required scopes"
}{
"detail": "Forbidden: API Key does not have required scopes"
}{
"detail": "Forbidden: API Key does not have required scopes"
}Authorizations
Kupe dashboard API key for your user.
Path Parameters
Query Parameters
Body
Body for PUT /api/v1/agents/{agent_id} (partial update). Send only the sections you want to change; omitted top-level keys are left unchanged. agent_specific_config is deep-merged onto the stored configuration (omitted fields keep their current values). Active agents may require ?force_update=true. See AgentSpecificConfigInput for all behavior keys.
Show child attributes
Show child attributes
model_name: LLM catalog code or row UUID. Requests may also send the legacy property model_provider_id with the same meaning (OpenAPI lists one field to avoid duplicate inputs).
Show child attributes
Show child attributes
tts_model_name selects the TTS row (catalog code or UUID). Optional language sets voice_parameters.language (e.g. en, hi-IN). Legacy body key tts_provider_id is accepted as an alias for tts_model_name only (not listed as a second field).
Show child attributes
Show child attributes
transcriber_model_name selects the STT row (catalog code or UUID, e.g. saarika:2.5). language is a locale string (e.g. hi-IN); a single-element array ["hi-IN"] is coerced to that string. The pipeline STT model id is derived from the catalog row only — it is not sent in this object. Legacy provider_id is an alias for transcriber_model_name.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Per-agent behavior stored in agent_specific_configs.configuration. On create (POST /api/v1/agents) and update (PUT /api/v1/agents/{agent_id}), send under agent_specific_config; omitted keys keep platform or existing values (partial PUT merges). Returned on GET /api/v1/agents/{agent_id} under configurations.agent_specific_config. Dashboard may use camelCase aliases (e.g. autoTerminate → auto_terminate_call).
Show child attributes
Show child attributes

