Update Voice Config
curl --request PATCH \
--url https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"language_locale": "<string>",
"name": "<string>",
"prompt": "<string>",
"first_message": "<string>",
"first_message_uninterruptible": true,
"first_message_delay_ms": 1,
"voice_id": "<string>",
"temperature": 1,
"recording_enabled": true,
"inactivity_messages": [
{
"delay_seconds": 15,
"end_behavior": "END_BEHAVIOR_UNSPECIFIED",
"message": "Are you still there?"
}
],
"silence_timeout": 62,
"max_duration": 3615,
"is_default": true,
"is_active": true,
"config": {}
}
'import requests
url = "https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id}"
payload = {
"language_locale": "<string>",
"name": "<string>",
"prompt": "<string>",
"first_message": "<string>",
"first_message_uninterruptible": True,
"first_message_delay_ms": 1,
"voice_id": "<string>",
"temperature": 1,
"recording_enabled": True,
"inactivity_messages": [
{
"delay_seconds": 15,
"end_behavior": "END_BEHAVIOR_UNSPECIFIED",
"message": "Are you still there?"
}
],
"silence_timeout": 62,
"max_duration": 3615,
"is_default": True,
"is_active": True,
"config": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
language_locale: '<string>',
name: '<string>',
prompt: '<string>',
first_message: '<string>',
first_message_uninterruptible: true,
first_message_delay_ms: 1,
voice_id: '<string>',
temperature: 1,
recording_enabled: true,
inactivity_messages: [
{
delay_seconds: 15,
end_behavior: 'END_BEHAVIOR_UNSPECIFIED',
message: 'Are you still there?'
}
],
silence_timeout: 62,
max_duration: 3615,
is_default: true,
is_active: true,
config: {}
})
};
fetch('https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_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.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_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([
'language_locale' => '<string>',
'name' => '<string>',
'prompt' => '<string>',
'first_message' => '<string>',
'first_message_uninterruptible' => true,
'first_message_delay_ms' => 1,
'voice_id' => '<string>',
'temperature' => 1,
'recording_enabled' => true,
'inactivity_messages' => [
[
'delay_seconds' => 15,
'end_behavior' => 'END_BEHAVIOR_UNSPECIFIED',
'message' => 'Are you still there?'
]
],
'silence_timeout' => 62,
'max_duration' => 3615,
'is_default' => true,
'is_active' => true,
'config' => [
]
]),
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.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id}"
payload := strings.NewReader("{\n \"language_locale\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"first_message\": \"<string>\",\n \"first_message_uninterruptible\": true,\n \"first_message_delay_ms\": 1,\n \"voice_id\": \"<string>\",\n \"temperature\": 1,\n \"recording_enabled\": true,\n \"inactivity_messages\": [\n {\n \"delay_seconds\": 15,\n \"end_behavior\": \"END_BEHAVIOR_UNSPECIFIED\",\n \"message\": \"Are you still there?\"\n }\n ],\n \"silence_timeout\": 62,\n \"max_duration\": 3615,\n \"is_default\": true,\n \"is_active\": true,\n \"config\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"language_locale\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"first_message\": \"<string>\",\n \"first_message_uninterruptible\": true,\n \"first_message_delay_ms\": 1,\n \"voice_id\": \"<string>\",\n \"temperature\": 1,\n \"recording_enabled\": true,\n \"inactivity_messages\": [\n {\n \"delay_seconds\": 15,\n \"end_behavior\": \"END_BEHAVIOR_UNSPECIFIED\",\n \"message\": \"Are you still there?\"\n }\n ],\n \"silence_timeout\": 62,\n \"max_duration\": 3615,\n \"is_default\": true,\n \"is_active\": true,\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"language_locale\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"first_message\": \"<string>\",\n \"first_message_uninterruptible\": true,\n \"first_message_delay_ms\": 1,\n \"voice_id\": \"<string>\",\n \"temperature\": 1,\n \"recording_enabled\": true,\n \"inactivity_messages\": [\n {\n \"delay_seconds\": 15,\n \"end_behavior\": \"END_BEHAVIOR_UNSPECIFIED\",\n \"message\": \"Are you still there?\"\n }\n ],\n \"silence_timeout\": 62,\n \"max_duration\": 3615,\n \"is_default\": true,\n \"is_active\": true,\n \"config\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"language_locale": "<string>",
"prompt": "<string>",
"first_speaker": "<string>",
"recording_enabled": true,
"silence_timeout": 123,
"max_duration": 123,
"is_default": true,
"is_active": true,
"first_message": "<string>",
"first_message_uninterruptible": false,
"first_message_delay_ms": 123,
"voice_id": "<string>",
"voice_name": "<string>",
"model": "<string>",
"temperature": 123,
"inactivity_messages": [
{}
],
"corpus_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error": "Invalid or missing API key",
"code": "UNAUTHORIZED",
"details": {}
}{
"error": "Voice config not found",
"code": "NOT_FOUND",
"details": {
"config_id": "non_existent_id"
}
}{
"error": "Validation failed",
"code": "VALIDATION_ERROR",
"details": {
"errors": [
{
"field": "body.name",
"message": "Field required",
"type": "missing"
}
]
}
}Agents
Update Voice Config
Update a voice configuration.
PATCH
/
agents
/
{agent_id}
/
voice-configs
/
{config_id}
Update Voice Config
curl --request PATCH \
--url https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"language_locale": "<string>",
"name": "<string>",
"prompt": "<string>",
"first_message": "<string>",
"first_message_uninterruptible": true,
"first_message_delay_ms": 1,
"voice_id": "<string>",
"temperature": 1,
"recording_enabled": true,
"inactivity_messages": [
{
"delay_seconds": 15,
"end_behavior": "END_BEHAVIOR_UNSPECIFIED",
"message": "Are you still there?"
}
],
"silence_timeout": 62,
"max_duration": 3615,
"is_default": true,
"is_active": true,
"config": {}
}
'import requests
url = "https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id}"
payload = {
"language_locale": "<string>",
"name": "<string>",
"prompt": "<string>",
"first_message": "<string>",
"first_message_uninterruptible": True,
"first_message_delay_ms": 1,
"voice_id": "<string>",
"temperature": 1,
"recording_enabled": True,
"inactivity_messages": [
{
"delay_seconds": 15,
"end_behavior": "END_BEHAVIOR_UNSPECIFIED",
"message": "Are you still there?"
}
],
"silence_timeout": 62,
"max_duration": 3615,
"is_default": True,
"is_active": True,
"config": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
language_locale: '<string>',
name: '<string>',
prompt: '<string>',
first_message: '<string>',
first_message_uninterruptible: true,
first_message_delay_ms: 1,
voice_id: '<string>',
temperature: 1,
recording_enabled: true,
inactivity_messages: [
{
delay_seconds: 15,
end_behavior: 'END_BEHAVIOR_UNSPECIFIED',
message: 'Are you still there?'
}
],
silence_timeout: 62,
max_duration: 3615,
is_default: true,
is_active: true,
config: {}
})
};
fetch('https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_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.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_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([
'language_locale' => '<string>',
'name' => '<string>',
'prompt' => '<string>',
'first_message' => '<string>',
'first_message_uninterruptible' => true,
'first_message_delay_ms' => 1,
'voice_id' => '<string>',
'temperature' => 1,
'recording_enabled' => true,
'inactivity_messages' => [
[
'delay_seconds' => 15,
'end_behavior' => 'END_BEHAVIOR_UNSPECIFIED',
'message' => 'Are you still there?'
]
],
'silence_timeout' => 62,
'max_duration' => 3615,
'is_default' => true,
'is_active' => true,
'config' => [
]
]),
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.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id}"
payload := strings.NewReader("{\n \"language_locale\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"first_message\": \"<string>\",\n \"first_message_uninterruptible\": true,\n \"first_message_delay_ms\": 1,\n \"voice_id\": \"<string>\",\n \"temperature\": 1,\n \"recording_enabled\": true,\n \"inactivity_messages\": [\n {\n \"delay_seconds\": 15,\n \"end_behavior\": \"END_BEHAVIOR_UNSPECIFIED\",\n \"message\": \"Are you still there?\"\n }\n ],\n \"silence_timeout\": 62,\n \"max_duration\": 3615,\n \"is_default\": true,\n \"is_active\": true,\n \"config\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"language_locale\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"first_message\": \"<string>\",\n \"first_message_uninterruptible\": true,\n \"first_message_delay_ms\": 1,\n \"voice_id\": \"<string>\",\n \"temperature\": 1,\n \"recording_enabled\": true,\n \"inactivity_messages\": [\n {\n \"delay_seconds\": 15,\n \"end_behavior\": \"END_BEHAVIOR_UNSPECIFIED\",\n \"message\": \"Are you still there?\"\n }\n ],\n \"silence_timeout\": 62,\n \"max_duration\": 3615,\n \"is_default\": true,\n \"is_active\": true,\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kejue.co/api/v1/agents/{agent_id}/voice-configs/{config_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"language_locale\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"first_message\": \"<string>\",\n \"first_message_uninterruptible\": true,\n \"first_message_delay_ms\": 1,\n \"voice_id\": \"<string>\",\n \"temperature\": 1,\n \"recording_enabled\": true,\n \"inactivity_messages\": [\n {\n \"delay_seconds\": 15,\n \"end_behavior\": \"END_BEHAVIOR_UNSPECIFIED\",\n \"message\": \"Are you still there?\"\n }\n ],\n \"silence_timeout\": 62,\n \"max_duration\": 3615,\n \"is_default\": true,\n \"is_active\": true,\n \"config\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"language_locale": "<string>",
"prompt": "<string>",
"first_speaker": "<string>",
"recording_enabled": true,
"silence_timeout": 123,
"max_duration": 123,
"is_default": true,
"is_active": true,
"first_message": "<string>",
"first_message_uninterruptible": false,
"first_message_delay_ms": 123,
"voice_id": "<string>",
"voice_name": "<string>",
"model": "<string>",
"temperature": 123,
"inactivity_messages": [
{}
],
"corpus_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error": "Invalid or missing API key",
"code": "UNAUTHORIZED",
"details": {}
}{
"error": "Voice config not found",
"code": "NOT_FOUND",
"details": {
"config_id": "non_existent_id"
}
}{
"error": "Validation failed",
"code": "VALIDATION_ERROR",
"details": {
"errors": [
{
"field": "body.name",
"message": "Field required",
"type": "missing"
}
]
}
}Authorizations
Workspace API key (e.g. kej_live_...)
Body
application/json
Partial update for a voice configuration.
Who speaks first in the call.
Available options:
agent, user Required range:
x >= 0Available voice AI models.
Available options:
KJUE-v0, KJUE-v0-mini, KJUE-v0-large, KJUE-v1.0 Required range:
0 <= x <= 2Show child attributes
Show child attributes
Required range:
5 <= x <= 120Required range:
30 <= x <= 7200Response
Successful Response
Voice configuration in API responses (public-safe).
⌘I

