Update agent draft
curl --request PUT \
--url https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"system_prompt": "You are a helpful assistant.",
"first_message": "Hello! How can I help you today?",
"first_message_wait_time_seconds": 7,
"interruptible": true,
"language_voice_overrides": {},
"prompt_timezone": "Europe/Paris",
"workflow": {},
"widget": {
"text_only": false,
"text_input_enabled": true,
"transcript_enabled": false,
"language_selector": false,
"mic_muting_enabled": false,
"action_indicator": false,
"show_conversation_id": true,
"hide_audio_tags": true,
"markdown_allow_all_domains": false,
"markdown_allowed_domains": [
"<string>"
],
"markdown_include_www_variants": true,
"markdown_allow_http": true,
"terms_enabled": false,
"terms_require_acceptance": false,
"terms_key": "<string>",
"terms_text": "<string>",
"avatar_color_1": "<string>",
"avatar_color_2": "<string>",
"color_background": "<string>",
"color_text": "<string>",
"color_accent": "<string>",
"text_main_label": "<string>",
"text_start_call": "<string>",
"text_start_chat": "<string>",
"text_listening": "<string>",
"text_speaking": "<string>",
"text_input_placeholder": "<string>"
},
"guardrails": {
"focus": {
"enabled": false
},
"manipulation": {
"enabled": false
},
"custom": [
{
"id": "2b1c…",
"name": "No financial advice",
"prompt": "Block specific investment recommendations.",
"enabled": true,
"model": "gemini-2.5-flash-lite",
"retry_feedback": "<string>"
}
]
}
}
}
'import requests
url = "https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft"
payload = { "config": {
"system_prompt": "You are a helpful assistant.",
"first_message": "Hello! How can I help you today?",
"first_message_wait_time_seconds": 7,
"interruptible": True,
"language_voice_overrides": {},
"prompt_timezone": "Europe/Paris",
"workflow": {},
"widget": {
"text_only": False,
"text_input_enabled": True,
"transcript_enabled": False,
"language_selector": False,
"mic_muting_enabled": False,
"action_indicator": False,
"show_conversation_id": True,
"hide_audio_tags": True,
"markdown_allow_all_domains": False,
"markdown_allowed_domains": ["<string>"],
"markdown_include_www_variants": True,
"markdown_allow_http": True,
"terms_enabled": False,
"terms_require_acceptance": False,
"terms_key": "<string>",
"terms_text": "<string>",
"avatar_color_1": "<string>",
"avatar_color_2": "<string>",
"color_background": "<string>",
"color_text": "<string>",
"color_accent": "<string>",
"text_main_label": "<string>",
"text_start_call": "<string>",
"text_start_chat": "<string>",
"text_listening": "<string>",
"text_speaking": "<string>",
"text_input_placeholder": "<string>"
},
"guardrails": {
"focus": { "enabled": False },
"manipulation": { "enabled": False },
"custom": [
{
"id": "2b1c…",
"name": "No financial advice",
"prompt": "Block specific investment recommendations.",
"enabled": True,
"model": "gemini-2.5-flash-lite",
"retry_feedback": "<string>"
}
]
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
system_prompt: 'You are a helpful assistant.',
first_message: 'Hello! How can I help you today?',
first_message_wait_time_seconds: 7,
interruptible: true,
language_voice_overrides: {},
prompt_timezone: 'Europe/Paris',
workflow: {},
widget: {
text_only: false,
text_input_enabled: true,
transcript_enabled: false,
language_selector: false,
mic_muting_enabled: false,
action_indicator: false,
show_conversation_id: true,
hide_audio_tags: true,
markdown_allow_all_domains: false,
markdown_allowed_domains: ['<string>'],
markdown_include_www_variants: true,
markdown_allow_http: true,
terms_enabled: false,
terms_require_acceptance: false,
terms_key: '<string>',
terms_text: '<string>',
avatar_color_1: '<string>',
avatar_color_2: '<string>',
color_background: '<string>',
color_text: '<string>',
color_accent: '<string>',
text_main_label: '<string>',
text_start_call: '<string>',
text_start_chat: '<string>',
text_listening: '<string>',
text_speaking: '<string>',
text_input_placeholder: '<string>'
},
guardrails: {
focus: {enabled: false},
manipulation: {enabled: false},
custom: [
{
id: '2b1c…',
name: 'No financial advice',
prompt: 'Block specific investment recommendations.',
enabled: true,
model: 'gemini-2.5-flash-lite',
retry_feedback: '<string>'
}
]
}
}
})
};
fetch('https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft', 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.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft",
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([
'config' => [
'system_prompt' => 'You are a helpful assistant.',
'first_message' => 'Hello! How can I help you today?',
'first_message_wait_time_seconds' => 7,
'interruptible' => true,
'language_voice_overrides' => [
],
'prompt_timezone' => 'Europe/Paris',
'workflow' => [
],
'widget' => [
'text_only' => false,
'text_input_enabled' => true,
'transcript_enabled' => false,
'language_selector' => false,
'mic_muting_enabled' => false,
'action_indicator' => false,
'show_conversation_id' => true,
'hide_audio_tags' => true,
'markdown_allow_all_domains' => false,
'markdown_allowed_domains' => [
'<string>'
],
'markdown_include_www_variants' => true,
'markdown_allow_http' => true,
'terms_enabled' => false,
'terms_require_acceptance' => false,
'terms_key' => '<string>',
'terms_text' => '<string>',
'avatar_color_1' => '<string>',
'avatar_color_2' => '<string>',
'color_background' => '<string>',
'color_text' => '<string>',
'color_accent' => '<string>',
'text_main_label' => '<string>',
'text_start_call' => '<string>',
'text_start_chat' => '<string>',
'text_listening' => '<string>',
'text_speaking' => '<string>',
'text_input_placeholder' => '<string>'
],
'guardrails' => [
'focus' => [
'enabled' => false
],
'manipulation' => [
'enabled' => false
],
'custom' => [
[
'id' => '2b1c…',
'name' => 'No financial advice',
'prompt' => 'Block specific investment recommendations.',
'enabled' => true,
'model' => 'gemini-2.5-flash-lite',
'retry_feedback' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft"
payload := strings.NewReader("{\n \"config\": {\n \"system_prompt\": \"You are a helpful assistant.\",\n \"first_message\": \"Hello! How can I help you today?\",\n \"first_message_wait_time_seconds\": 7,\n \"interruptible\": true,\n \"language_voice_overrides\": {},\n \"prompt_timezone\": \"Europe/Paris\",\n \"workflow\": {},\n \"widget\": {\n \"text_only\": false,\n \"text_input_enabled\": true,\n \"transcript_enabled\": false,\n \"language_selector\": false,\n \"mic_muting_enabled\": false,\n \"action_indicator\": false,\n \"show_conversation_id\": true,\n \"hide_audio_tags\": true,\n \"markdown_allow_all_domains\": false,\n \"markdown_allowed_domains\": [\n \"<string>\"\n ],\n \"markdown_include_www_variants\": true,\n \"markdown_allow_http\": true,\n \"terms_enabled\": false,\n \"terms_require_acceptance\": false,\n \"terms_key\": \"<string>\",\n \"terms_text\": \"<string>\",\n \"avatar_color_1\": \"<string>\",\n \"avatar_color_2\": \"<string>\",\n \"color_background\": \"<string>\",\n \"color_text\": \"<string>\",\n \"color_accent\": \"<string>\",\n \"text_main_label\": \"<string>\",\n \"text_start_call\": \"<string>\",\n \"text_start_chat\": \"<string>\",\n \"text_listening\": \"<string>\",\n \"text_speaking\": \"<string>\",\n \"text_input_placeholder\": \"<string>\"\n },\n \"guardrails\": {\n \"focus\": {\n \"enabled\": false\n },\n \"manipulation\": {\n \"enabled\": false\n },\n \"custom\": [\n {\n \"id\": \"2b1c…\",\n \"name\": \"No financial advice\",\n \"prompt\": \"Block specific investment recommendations.\",\n \"enabled\": true,\n \"model\": \"gemini-2.5-flash-lite\",\n \"retry_feedback\": \"<string>\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"system_prompt\": \"You are a helpful assistant.\",\n \"first_message\": \"Hello! How can I help you today?\",\n \"first_message_wait_time_seconds\": 7,\n \"interruptible\": true,\n \"language_voice_overrides\": {},\n \"prompt_timezone\": \"Europe/Paris\",\n \"workflow\": {},\n \"widget\": {\n \"text_only\": false,\n \"text_input_enabled\": true,\n \"transcript_enabled\": false,\n \"language_selector\": false,\n \"mic_muting_enabled\": false,\n \"action_indicator\": false,\n \"show_conversation_id\": true,\n \"hide_audio_tags\": true,\n \"markdown_allow_all_domains\": false,\n \"markdown_allowed_domains\": [\n \"<string>\"\n ],\n \"markdown_include_www_variants\": true,\n \"markdown_allow_http\": true,\n \"terms_enabled\": false,\n \"terms_require_acceptance\": false,\n \"terms_key\": \"<string>\",\n \"terms_text\": \"<string>\",\n \"avatar_color_1\": \"<string>\",\n \"avatar_color_2\": \"<string>\",\n \"color_background\": \"<string>\",\n \"color_text\": \"<string>\",\n \"color_accent\": \"<string>\",\n \"text_main_label\": \"<string>\",\n \"text_start_call\": \"<string>\",\n \"text_start_chat\": \"<string>\",\n \"text_listening\": \"<string>\",\n \"text_speaking\": \"<string>\",\n \"text_input_placeholder\": \"<string>\"\n },\n \"guardrails\": {\n \"focus\": {\n \"enabled\": false\n },\n \"manipulation\": {\n \"enabled\": false\n },\n \"custom\": [\n {\n \"id\": \"2b1c…\",\n \"name\": \"No financial advice\",\n \"prompt\": \"Block specific investment recommendations.\",\n \"enabled\": true,\n \"model\": \"gemini-2.5-flash-lite\",\n \"retry_feedback\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"system_prompt\": \"You are a helpful assistant.\",\n \"first_message\": \"Hello! How can I help you today?\",\n \"first_message_wait_time_seconds\": 7,\n \"interruptible\": true,\n \"language_voice_overrides\": {},\n \"prompt_timezone\": \"Europe/Paris\",\n \"workflow\": {},\n \"widget\": {\n \"text_only\": false,\n \"text_input_enabled\": true,\n \"transcript_enabled\": false,\n \"language_selector\": false,\n \"mic_muting_enabled\": false,\n \"action_indicator\": false,\n \"show_conversation_id\": true,\n \"hide_audio_tags\": true,\n \"markdown_allow_all_domains\": false,\n \"markdown_allowed_domains\": [\n \"<string>\"\n ],\n \"markdown_include_www_variants\": true,\n \"markdown_allow_http\": true,\n \"terms_enabled\": false,\n \"terms_require_acceptance\": false,\n \"terms_key\": \"<string>\",\n \"terms_text\": \"<string>\",\n \"avatar_color_1\": \"<string>\",\n \"avatar_color_2\": \"<string>\",\n \"color_background\": \"<string>\",\n \"color_text\": \"<string>\",\n \"color_accent\": \"<string>\",\n \"text_main_label\": \"<string>\",\n \"text_start_call\": \"<string>\",\n \"text_start_chat\": \"<string>\",\n \"text_listening\": \"<string>\",\n \"text_speaking\": \"<string>\",\n \"text_input_placeholder\": \"<string>\"\n },\n \"guardrails\": {\n \"focus\": {\n \"enabled\": false\n },\n \"manipulation\": {\n \"enabled\": false\n },\n \"custom\": [\n {\n \"id\": \"2b1c…\",\n \"name\": \"No financial advice\",\n \"prompt\": \"Block specific investment recommendations.\",\n \"enabled\": true,\n \"model\": \"gemini-2.5-flash-lite\",\n \"retry_feedback\": \"<string>\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_bodyDrafts
Update agent draft
PUT
/
v1
/
agents
/
{agentId}
/
branches
/
{branchId}
/
draft
Update agent draft
curl --request PUT \
--url https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"system_prompt": "You are a helpful assistant.",
"first_message": "Hello! How can I help you today?",
"first_message_wait_time_seconds": 7,
"interruptible": true,
"language_voice_overrides": {},
"prompt_timezone": "Europe/Paris",
"workflow": {},
"widget": {
"text_only": false,
"text_input_enabled": true,
"transcript_enabled": false,
"language_selector": false,
"mic_muting_enabled": false,
"action_indicator": false,
"show_conversation_id": true,
"hide_audio_tags": true,
"markdown_allow_all_domains": false,
"markdown_allowed_domains": [
"<string>"
],
"markdown_include_www_variants": true,
"markdown_allow_http": true,
"terms_enabled": false,
"terms_require_acceptance": false,
"terms_key": "<string>",
"terms_text": "<string>",
"avatar_color_1": "<string>",
"avatar_color_2": "<string>",
"color_background": "<string>",
"color_text": "<string>",
"color_accent": "<string>",
"text_main_label": "<string>",
"text_start_call": "<string>",
"text_start_chat": "<string>",
"text_listening": "<string>",
"text_speaking": "<string>",
"text_input_placeholder": "<string>"
},
"guardrails": {
"focus": {
"enabled": false
},
"manipulation": {
"enabled": false
},
"custom": [
{
"id": "2b1c…",
"name": "No financial advice",
"prompt": "Block specific investment recommendations.",
"enabled": true,
"model": "gemini-2.5-flash-lite",
"retry_feedback": "<string>"
}
]
}
}
}
'import requests
url = "https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft"
payload = { "config": {
"system_prompt": "You are a helpful assistant.",
"first_message": "Hello! How can I help you today?",
"first_message_wait_time_seconds": 7,
"interruptible": True,
"language_voice_overrides": {},
"prompt_timezone": "Europe/Paris",
"workflow": {},
"widget": {
"text_only": False,
"text_input_enabled": True,
"transcript_enabled": False,
"language_selector": False,
"mic_muting_enabled": False,
"action_indicator": False,
"show_conversation_id": True,
"hide_audio_tags": True,
"markdown_allow_all_domains": False,
"markdown_allowed_domains": ["<string>"],
"markdown_include_www_variants": True,
"markdown_allow_http": True,
"terms_enabled": False,
"terms_require_acceptance": False,
"terms_key": "<string>",
"terms_text": "<string>",
"avatar_color_1": "<string>",
"avatar_color_2": "<string>",
"color_background": "<string>",
"color_text": "<string>",
"color_accent": "<string>",
"text_main_label": "<string>",
"text_start_call": "<string>",
"text_start_chat": "<string>",
"text_listening": "<string>",
"text_speaking": "<string>",
"text_input_placeholder": "<string>"
},
"guardrails": {
"focus": { "enabled": False },
"manipulation": { "enabled": False },
"custom": [
{
"id": "2b1c…",
"name": "No financial advice",
"prompt": "Block specific investment recommendations.",
"enabled": True,
"model": "gemini-2.5-flash-lite",
"retry_feedback": "<string>"
}
]
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
system_prompt: 'You are a helpful assistant.',
first_message: 'Hello! How can I help you today?',
first_message_wait_time_seconds: 7,
interruptible: true,
language_voice_overrides: {},
prompt_timezone: 'Europe/Paris',
workflow: {},
widget: {
text_only: false,
text_input_enabled: true,
transcript_enabled: false,
language_selector: false,
mic_muting_enabled: false,
action_indicator: false,
show_conversation_id: true,
hide_audio_tags: true,
markdown_allow_all_domains: false,
markdown_allowed_domains: ['<string>'],
markdown_include_www_variants: true,
markdown_allow_http: true,
terms_enabled: false,
terms_require_acceptance: false,
terms_key: '<string>',
terms_text: '<string>',
avatar_color_1: '<string>',
avatar_color_2: '<string>',
color_background: '<string>',
color_text: '<string>',
color_accent: '<string>',
text_main_label: '<string>',
text_start_call: '<string>',
text_start_chat: '<string>',
text_listening: '<string>',
text_speaking: '<string>',
text_input_placeholder: '<string>'
},
guardrails: {
focus: {enabled: false},
manipulation: {enabled: false},
custom: [
{
id: '2b1c…',
name: 'No financial advice',
prompt: 'Block specific investment recommendations.',
enabled: true,
model: 'gemini-2.5-flash-lite',
retry_feedback: '<string>'
}
]
}
}
})
};
fetch('https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft', 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.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft",
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([
'config' => [
'system_prompt' => 'You are a helpful assistant.',
'first_message' => 'Hello! How can I help you today?',
'first_message_wait_time_seconds' => 7,
'interruptible' => true,
'language_voice_overrides' => [
],
'prompt_timezone' => 'Europe/Paris',
'workflow' => [
],
'widget' => [
'text_only' => false,
'text_input_enabled' => true,
'transcript_enabled' => false,
'language_selector' => false,
'mic_muting_enabled' => false,
'action_indicator' => false,
'show_conversation_id' => true,
'hide_audio_tags' => true,
'markdown_allow_all_domains' => false,
'markdown_allowed_domains' => [
'<string>'
],
'markdown_include_www_variants' => true,
'markdown_allow_http' => true,
'terms_enabled' => false,
'terms_require_acceptance' => false,
'terms_key' => '<string>',
'terms_text' => '<string>',
'avatar_color_1' => '<string>',
'avatar_color_2' => '<string>',
'color_background' => '<string>',
'color_text' => '<string>',
'color_accent' => '<string>',
'text_main_label' => '<string>',
'text_start_call' => '<string>',
'text_start_chat' => '<string>',
'text_listening' => '<string>',
'text_speaking' => '<string>',
'text_input_placeholder' => '<string>'
],
'guardrails' => [
'focus' => [
'enabled' => false
],
'manipulation' => [
'enabled' => false
],
'custom' => [
[
'id' => '2b1c…',
'name' => 'No financial advice',
'prompt' => 'Block specific investment recommendations.',
'enabled' => true,
'model' => 'gemini-2.5-flash-lite',
'retry_feedback' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft"
payload := strings.NewReader("{\n \"config\": {\n \"system_prompt\": \"You are a helpful assistant.\",\n \"first_message\": \"Hello! How can I help you today?\",\n \"first_message_wait_time_seconds\": 7,\n \"interruptible\": true,\n \"language_voice_overrides\": {},\n \"prompt_timezone\": \"Europe/Paris\",\n \"workflow\": {},\n \"widget\": {\n \"text_only\": false,\n \"text_input_enabled\": true,\n \"transcript_enabled\": false,\n \"language_selector\": false,\n \"mic_muting_enabled\": false,\n \"action_indicator\": false,\n \"show_conversation_id\": true,\n \"hide_audio_tags\": true,\n \"markdown_allow_all_domains\": false,\n \"markdown_allowed_domains\": [\n \"<string>\"\n ],\n \"markdown_include_www_variants\": true,\n \"markdown_allow_http\": true,\n \"terms_enabled\": false,\n \"terms_require_acceptance\": false,\n \"terms_key\": \"<string>\",\n \"terms_text\": \"<string>\",\n \"avatar_color_1\": \"<string>\",\n \"avatar_color_2\": \"<string>\",\n \"color_background\": \"<string>\",\n \"color_text\": \"<string>\",\n \"color_accent\": \"<string>\",\n \"text_main_label\": \"<string>\",\n \"text_start_call\": \"<string>\",\n \"text_start_chat\": \"<string>\",\n \"text_listening\": \"<string>\",\n \"text_speaking\": \"<string>\",\n \"text_input_placeholder\": \"<string>\"\n },\n \"guardrails\": {\n \"focus\": {\n \"enabled\": false\n },\n \"manipulation\": {\n \"enabled\": false\n },\n \"custom\": [\n {\n \"id\": \"2b1c…\",\n \"name\": \"No financial advice\",\n \"prompt\": \"Block specific investment recommendations.\",\n \"enabled\": true,\n \"model\": \"gemini-2.5-flash-lite\",\n \"retry_feedback\": \"<string>\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"system_prompt\": \"You are a helpful assistant.\",\n \"first_message\": \"Hello! How can I help you today?\",\n \"first_message_wait_time_seconds\": 7,\n \"interruptible\": true,\n \"language_voice_overrides\": {},\n \"prompt_timezone\": \"Europe/Paris\",\n \"workflow\": {},\n \"widget\": {\n \"text_only\": false,\n \"text_input_enabled\": true,\n \"transcript_enabled\": false,\n \"language_selector\": false,\n \"mic_muting_enabled\": false,\n \"action_indicator\": false,\n \"show_conversation_id\": true,\n \"hide_audio_tags\": true,\n \"markdown_allow_all_domains\": false,\n \"markdown_allowed_domains\": [\n \"<string>\"\n ],\n \"markdown_include_www_variants\": true,\n \"markdown_allow_http\": true,\n \"terms_enabled\": false,\n \"terms_require_acceptance\": false,\n \"terms_key\": \"<string>\",\n \"terms_text\": \"<string>\",\n \"avatar_color_1\": \"<string>\",\n \"avatar_color_2\": \"<string>\",\n \"color_background\": \"<string>\",\n \"color_text\": \"<string>\",\n \"color_accent\": \"<string>\",\n \"text_main_label\": \"<string>\",\n \"text_start_call\": \"<string>\",\n \"text_start_chat\": \"<string>\",\n \"text_listening\": \"<string>\",\n \"text_speaking\": \"<string>\",\n \"text_input_placeholder\": \"<string>\"\n },\n \"guardrails\": {\n \"focus\": {\n \"enabled\": false\n },\n \"manipulation\": {\n \"enabled\": false\n },\n \"custom\": [\n {\n \"id\": \"2b1c…\",\n \"name\": \"No financial advice\",\n \"prompt\": \"Block specific investment recommendations.\",\n \"enabled\": true,\n \"model\": \"gemini-2.5-flash-lite\",\n \"retry_feedback\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeptar.com/v1/agents/{agentId}/branches/{branchId}/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"system_prompt\": \"You are a helpful assistant.\",\n \"first_message\": \"Hello! How can I help you today?\",\n \"first_message_wait_time_seconds\": 7,\n \"interruptible\": true,\n \"language_voice_overrides\": {},\n \"prompt_timezone\": \"Europe/Paris\",\n \"workflow\": {},\n \"widget\": {\n \"text_only\": false,\n \"text_input_enabled\": true,\n \"transcript_enabled\": false,\n \"language_selector\": false,\n \"mic_muting_enabled\": false,\n \"action_indicator\": false,\n \"show_conversation_id\": true,\n \"hide_audio_tags\": true,\n \"markdown_allow_all_domains\": false,\n \"markdown_allowed_domains\": [\n \"<string>\"\n ],\n \"markdown_include_www_variants\": true,\n \"markdown_allow_http\": true,\n \"terms_enabled\": false,\n \"terms_require_acceptance\": false,\n \"terms_key\": \"<string>\",\n \"terms_text\": \"<string>\",\n \"avatar_color_1\": \"<string>\",\n \"avatar_color_2\": \"<string>\",\n \"color_background\": \"<string>\",\n \"color_text\": \"<string>\",\n \"color_accent\": \"<string>\",\n \"text_main_label\": \"<string>\",\n \"text_start_call\": \"<string>\",\n \"text_start_chat\": \"<string>\",\n \"text_listening\": \"<string>\",\n \"text_speaking\": \"<string>\",\n \"text_input_placeholder\": \"<string>\"\n },\n \"guardrails\": {\n \"focus\": {\n \"enabled\": false\n },\n \"manipulation\": {\n \"enabled\": false\n },\n \"custom\": [\n {\n \"id\": \"2b1c…\",\n \"name\": \"No financial advice\",\n \"prompt\": \"Block specific investment recommendations.\",\n \"enabled\": true,\n \"model\": \"gemini-2.5-flash-lite\",\n \"retry_feedback\": \"<string>\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
apiKeycookie
API key issued via POST /v1/api-keys. Prefix is zsk_. Pass as Authorization: Bearer zsk_…. Scopes are enforced per key.
Body
application/json
Show child attributes
Show child attributes
Response
200 - undefined
⌘I