Update agent
curl --request PUT \
--url https://www.chatbase.co/api/v2/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"instructions": "<string>",
"channelInstructions": {
"chat_widget": "<string>",
"help_page": "<string>",
"center_stage": "<string>",
"side_panel": "<string>",
"slack": "<string>",
"whatsapp": "<string>",
"messenger": "<string>",
"instagram": "<string>",
"salesforce": "<string>",
"zendesk": "<string>",
"zendesk_messaging": "<string>",
"api": "<string>",
"email": "<string>",
"android_sdk": "<string>",
"ios_sdk": "<string>",
"phone": "<string>"
},
"model": "gpt-5.1",
"temp": 0.5,
"allowedDomains": [
"<string>"
],
"suggestedMessages": [
{
"text": "<string>",
"type": "single",
"order": 123,
"icon": "<string>"
}
],
"initialMessages": [
"<string>"
],
"creditLimit": 123,
"notificationsSettings": {},
"ipRateLimits": {
"limit": 20,
"timeframe": 240,
"message": "Too many messages in a row"
},
"voiceSettings": {
"maxConcurrentSessions": 5,
"maxCallDurationSeconds": 900,
"maxDailyCallsPerUser": 10,
"model": "gpt-4o-mini",
"temperature": 0,
"allowInterruptions": true,
"allowTextInput": true,
"endConversationAfterSilenceSeconds": 300,
"initialMessage": "<string>",
"errorMessage": "<string>"
}
}
'import requests
url = "https://www.chatbase.co/api/v2/agents/{agentId}"
payload = {
"name": "<string>",
"instructions": "<string>",
"channelInstructions": {
"chat_widget": "<string>",
"help_page": "<string>",
"center_stage": "<string>",
"side_panel": "<string>",
"slack": "<string>",
"whatsapp": "<string>",
"messenger": "<string>",
"instagram": "<string>",
"salesforce": "<string>",
"zendesk": "<string>",
"zendesk_messaging": "<string>",
"api": "<string>",
"email": "<string>",
"android_sdk": "<string>",
"ios_sdk": "<string>",
"phone": "<string>"
},
"model": "gpt-5.1",
"temp": 0.5,
"allowedDomains": ["<string>"],
"suggestedMessages": [
{
"text": "<string>",
"type": "single",
"order": 123,
"icon": "<string>"
}
],
"initialMessages": ["<string>"],
"creditLimit": 123,
"notificationsSettings": {},
"ipRateLimits": {
"limit": 20,
"timeframe": 240,
"message": "Too many messages in a row"
},
"voiceSettings": {
"maxConcurrentSessions": 5,
"maxCallDurationSeconds": 900,
"maxDailyCallsPerUser": 10,
"model": "gpt-4o-mini",
"temperature": 0,
"allowInterruptions": True,
"allowTextInput": True,
"endConversationAfterSilenceSeconds": 300,
"initialMessage": "<string>",
"errorMessage": "<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({
name: '<string>',
instructions: '<string>',
channelInstructions: {
chat_widget: '<string>',
help_page: '<string>',
center_stage: '<string>',
side_panel: '<string>',
slack: '<string>',
whatsapp: '<string>',
messenger: '<string>',
instagram: '<string>',
salesforce: '<string>',
zendesk: '<string>',
zendesk_messaging: '<string>',
api: '<string>',
email: '<string>',
android_sdk: '<string>',
ios_sdk: '<string>',
phone: '<string>'
},
model: 'gpt-5.1',
temp: 0.5,
allowedDomains: ['<string>'],
suggestedMessages: [{text: '<string>', type: 'single', order: 123, icon: '<string>'}],
initialMessages: ['<string>'],
creditLimit: 123,
notificationsSettings: {},
ipRateLimits: {limit: 20, timeframe: 240, message: 'Too many messages in a row'},
voiceSettings: {
maxConcurrentSessions: 5,
maxCallDurationSeconds: 900,
maxDailyCallsPerUser: 10,
model: 'gpt-4o-mini',
temperature: 0,
allowInterruptions: true,
allowTextInput: true,
endConversationAfterSilenceSeconds: 300,
initialMessage: '<string>',
errorMessage: '<string>'
}
})
};
fetch('https://www.chatbase.co/api/v2/agents/{agentId}', 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://www.chatbase.co/api/v2/agents/{agentId}",
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([
'name' => '<string>',
'instructions' => '<string>',
'channelInstructions' => [
'chat_widget' => '<string>',
'help_page' => '<string>',
'center_stage' => '<string>',
'side_panel' => '<string>',
'slack' => '<string>',
'whatsapp' => '<string>',
'messenger' => '<string>',
'instagram' => '<string>',
'salesforce' => '<string>',
'zendesk' => '<string>',
'zendesk_messaging' => '<string>',
'api' => '<string>',
'email' => '<string>',
'android_sdk' => '<string>',
'ios_sdk' => '<string>',
'phone' => '<string>'
],
'model' => 'gpt-5.1',
'temp' => 0.5,
'allowedDomains' => [
'<string>'
],
'suggestedMessages' => [
[
'text' => '<string>',
'type' => 'single',
'order' => 123,
'icon' => '<string>'
]
],
'initialMessages' => [
'<string>'
],
'creditLimit' => 123,
'notificationsSettings' => [
],
'ipRateLimits' => [
'limit' => 20,
'timeframe' => 240,
'message' => 'Too many messages in a row'
],
'voiceSettings' => [
'maxConcurrentSessions' => 5,
'maxCallDurationSeconds' => 900,
'maxDailyCallsPerUser' => 10,
'model' => 'gpt-4o-mini',
'temperature' => 0,
'allowInterruptions' => true,
'allowTextInput' => true,
'endConversationAfterSilenceSeconds' => 300,
'initialMessage' => '<string>',
'errorMessage' => '<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://www.chatbase.co/api/v2/agents/{agentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"channelInstructions\": {\n \"chat_widget\": \"<string>\",\n \"help_page\": \"<string>\",\n \"center_stage\": \"<string>\",\n \"side_panel\": \"<string>\",\n \"slack\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"messenger\": \"<string>\",\n \"instagram\": \"<string>\",\n \"salesforce\": \"<string>\",\n \"zendesk\": \"<string>\",\n \"zendesk_messaging\": \"<string>\",\n \"api\": \"<string>\",\n \"email\": \"<string>\",\n \"android_sdk\": \"<string>\",\n \"ios_sdk\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"model\": \"gpt-5.1\",\n \"temp\": 0.5,\n \"allowedDomains\": [\n \"<string>\"\n ],\n \"suggestedMessages\": [\n {\n \"text\": \"<string>\",\n \"type\": \"single\",\n \"order\": 123,\n \"icon\": \"<string>\"\n }\n ],\n \"initialMessages\": [\n \"<string>\"\n ],\n \"creditLimit\": 123,\n \"notificationsSettings\": {},\n \"ipRateLimits\": {\n \"limit\": 20,\n \"timeframe\": 240,\n \"message\": \"Too many messages in a row\"\n },\n \"voiceSettings\": {\n \"maxConcurrentSessions\": 5,\n \"maxCallDurationSeconds\": 900,\n \"maxDailyCallsPerUser\": 10,\n \"model\": \"gpt-4o-mini\",\n \"temperature\": 0,\n \"allowInterruptions\": true,\n \"allowTextInput\": true,\n \"endConversationAfterSilenceSeconds\": 300,\n \"initialMessage\": \"<string>\",\n \"errorMessage\": \"<string>\"\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://www.chatbase.co/api/v2/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"channelInstructions\": {\n \"chat_widget\": \"<string>\",\n \"help_page\": \"<string>\",\n \"center_stage\": \"<string>\",\n \"side_panel\": \"<string>\",\n \"slack\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"messenger\": \"<string>\",\n \"instagram\": \"<string>\",\n \"salesforce\": \"<string>\",\n \"zendesk\": \"<string>\",\n \"zendesk_messaging\": \"<string>\",\n \"api\": \"<string>\",\n \"email\": \"<string>\",\n \"android_sdk\": \"<string>\",\n \"ios_sdk\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"model\": \"gpt-5.1\",\n \"temp\": 0.5,\n \"allowedDomains\": [\n \"<string>\"\n ],\n \"suggestedMessages\": [\n {\n \"text\": \"<string>\",\n \"type\": \"single\",\n \"order\": 123,\n \"icon\": \"<string>\"\n }\n ],\n \"initialMessages\": [\n \"<string>\"\n ],\n \"creditLimit\": 123,\n \"notificationsSettings\": {},\n \"ipRateLimits\": {\n \"limit\": 20,\n \"timeframe\": 240,\n \"message\": \"Too many messages in a row\"\n },\n \"voiceSettings\": {\n \"maxConcurrentSessions\": 5,\n \"maxCallDurationSeconds\": 900,\n \"maxDailyCallsPerUser\": 10,\n \"model\": \"gpt-4o-mini\",\n \"temperature\": 0,\n \"allowInterruptions\": true,\n \"allowTextInput\": true,\n \"endConversationAfterSilenceSeconds\": 300,\n \"initialMessage\": \"<string>\",\n \"errorMessage\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.chatbase.co/api/v2/agents/{agentId}")
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 \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"channelInstructions\": {\n \"chat_widget\": \"<string>\",\n \"help_page\": \"<string>\",\n \"center_stage\": \"<string>\",\n \"side_panel\": \"<string>\",\n \"slack\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"messenger\": \"<string>\",\n \"instagram\": \"<string>\",\n \"salesforce\": \"<string>\",\n \"zendesk\": \"<string>\",\n \"zendesk_messaging\": \"<string>\",\n \"api\": \"<string>\",\n \"email\": \"<string>\",\n \"android_sdk\": \"<string>\",\n \"ios_sdk\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"model\": \"gpt-5.1\",\n \"temp\": 0.5,\n \"allowedDomains\": [\n \"<string>\"\n ],\n \"suggestedMessages\": [\n {\n \"text\": \"<string>\",\n \"type\": \"single\",\n \"order\": 123,\n \"icon\": \"<string>\"\n }\n ],\n \"initialMessages\": [\n \"<string>\"\n ],\n \"creditLimit\": 123,\n \"notificationsSettings\": {},\n \"ipRateLimits\": {\n \"limit\": 20,\n \"timeframe\": 240,\n \"message\": \"Too many messages in a row\"\n },\n \"voiceSettings\": {\n \"maxConcurrentSessions\": 5,\n \"maxCallDurationSeconds\": 900,\n \"maxDailyCallsPerUser\": 10,\n \"model\": \"gpt-4o-mini\",\n \"temperature\": 0,\n \"allowInterruptions\": true,\n \"allowTextInput\": true,\n \"endConversationAfterSilenceSeconds\": 300,\n \"initialMessage\": \"<string>\",\n \"errorMessage\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": {
"code": "VALIDATION_INVALID_BODY",
"message": "Invalid request"
}
}{
"error": {
"code": "AUTH_MISSING_API_KEY",
"message": "Authentication required"
}
}{
"error": {
"code": "SUBSCRIPTION_API_RESTRICTED_PLAN",
"message": "A Standard plan or higher is required to access the API"
}
}{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "Agent not found"
}
}{
"error": {
"code": "RATE_LIMIT_TOO_MANY_REQUESTS",
"message": "Too many requests, please try again later"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Something went wrong, please try again"
}
}{
"error": {
"code": "SERVICE_UNDER_MAINTENANCE",
"message": "The API is temporarily unavailable for scheduled maintenance, please try again later"
}
}Agents
Update agent
Partially updates an agent. Only provided fields are changed.
PUT
/
agents
/
{agentId}
Update agent
curl --request PUT \
--url https://www.chatbase.co/api/v2/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"instructions": "<string>",
"channelInstructions": {
"chat_widget": "<string>",
"help_page": "<string>",
"center_stage": "<string>",
"side_panel": "<string>",
"slack": "<string>",
"whatsapp": "<string>",
"messenger": "<string>",
"instagram": "<string>",
"salesforce": "<string>",
"zendesk": "<string>",
"zendesk_messaging": "<string>",
"api": "<string>",
"email": "<string>",
"android_sdk": "<string>",
"ios_sdk": "<string>",
"phone": "<string>"
},
"model": "gpt-5.1",
"temp": 0.5,
"allowedDomains": [
"<string>"
],
"suggestedMessages": [
{
"text": "<string>",
"type": "single",
"order": 123,
"icon": "<string>"
}
],
"initialMessages": [
"<string>"
],
"creditLimit": 123,
"notificationsSettings": {},
"ipRateLimits": {
"limit": 20,
"timeframe": 240,
"message": "Too many messages in a row"
},
"voiceSettings": {
"maxConcurrentSessions": 5,
"maxCallDurationSeconds": 900,
"maxDailyCallsPerUser": 10,
"model": "gpt-4o-mini",
"temperature": 0,
"allowInterruptions": true,
"allowTextInput": true,
"endConversationAfterSilenceSeconds": 300,
"initialMessage": "<string>",
"errorMessage": "<string>"
}
}
'import requests
url = "https://www.chatbase.co/api/v2/agents/{agentId}"
payload = {
"name": "<string>",
"instructions": "<string>",
"channelInstructions": {
"chat_widget": "<string>",
"help_page": "<string>",
"center_stage": "<string>",
"side_panel": "<string>",
"slack": "<string>",
"whatsapp": "<string>",
"messenger": "<string>",
"instagram": "<string>",
"salesforce": "<string>",
"zendesk": "<string>",
"zendesk_messaging": "<string>",
"api": "<string>",
"email": "<string>",
"android_sdk": "<string>",
"ios_sdk": "<string>",
"phone": "<string>"
},
"model": "gpt-5.1",
"temp": 0.5,
"allowedDomains": ["<string>"],
"suggestedMessages": [
{
"text": "<string>",
"type": "single",
"order": 123,
"icon": "<string>"
}
],
"initialMessages": ["<string>"],
"creditLimit": 123,
"notificationsSettings": {},
"ipRateLimits": {
"limit": 20,
"timeframe": 240,
"message": "Too many messages in a row"
},
"voiceSettings": {
"maxConcurrentSessions": 5,
"maxCallDurationSeconds": 900,
"maxDailyCallsPerUser": 10,
"model": "gpt-4o-mini",
"temperature": 0,
"allowInterruptions": True,
"allowTextInput": True,
"endConversationAfterSilenceSeconds": 300,
"initialMessage": "<string>",
"errorMessage": "<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({
name: '<string>',
instructions: '<string>',
channelInstructions: {
chat_widget: '<string>',
help_page: '<string>',
center_stage: '<string>',
side_panel: '<string>',
slack: '<string>',
whatsapp: '<string>',
messenger: '<string>',
instagram: '<string>',
salesforce: '<string>',
zendesk: '<string>',
zendesk_messaging: '<string>',
api: '<string>',
email: '<string>',
android_sdk: '<string>',
ios_sdk: '<string>',
phone: '<string>'
},
model: 'gpt-5.1',
temp: 0.5,
allowedDomains: ['<string>'],
suggestedMessages: [{text: '<string>', type: 'single', order: 123, icon: '<string>'}],
initialMessages: ['<string>'],
creditLimit: 123,
notificationsSettings: {},
ipRateLimits: {limit: 20, timeframe: 240, message: 'Too many messages in a row'},
voiceSettings: {
maxConcurrentSessions: 5,
maxCallDurationSeconds: 900,
maxDailyCallsPerUser: 10,
model: 'gpt-4o-mini',
temperature: 0,
allowInterruptions: true,
allowTextInput: true,
endConversationAfterSilenceSeconds: 300,
initialMessage: '<string>',
errorMessage: '<string>'
}
})
};
fetch('https://www.chatbase.co/api/v2/agents/{agentId}', 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://www.chatbase.co/api/v2/agents/{agentId}",
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([
'name' => '<string>',
'instructions' => '<string>',
'channelInstructions' => [
'chat_widget' => '<string>',
'help_page' => '<string>',
'center_stage' => '<string>',
'side_panel' => '<string>',
'slack' => '<string>',
'whatsapp' => '<string>',
'messenger' => '<string>',
'instagram' => '<string>',
'salesforce' => '<string>',
'zendesk' => '<string>',
'zendesk_messaging' => '<string>',
'api' => '<string>',
'email' => '<string>',
'android_sdk' => '<string>',
'ios_sdk' => '<string>',
'phone' => '<string>'
],
'model' => 'gpt-5.1',
'temp' => 0.5,
'allowedDomains' => [
'<string>'
],
'suggestedMessages' => [
[
'text' => '<string>',
'type' => 'single',
'order' => 123,
'icon' => '<string>'
]
],
'initialMessages' => [
'<string>'
],
'creditLimit' => 123,
'notificationsSettings' => [
],
'ipRateLimits' => [
'limit' => 20,
'timeframe' => 240,
'message' => 'Too many messages in a row'
],
'voiceSettings' => [
'maxConcurrentSessions' => 5,
'maxCallDurationSeconds' => 900,
'maxDailyCallsPerUser' => 10,
'model' => 'gpt-4o-mini',
'temperature' => 0,
'allowInterruptions' => true,
'allowTextInput' => true,
'endConversationAfterSilenceSeconds' => 300,
'initialMessage' => '<string>',
'errorMessage' => '<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://www.chatbase.co/api/v2/agents/{agentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"channelInstructions\": {\n \"chat_widget\": \"<string>\",\n \"help_page\": \"<string>\",\n \"center_stage\": \"<string>\",\n \"side_panel\": \"<string>\",\n \"slack\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"messenger\": \"<string>\",\n \"instagram\": \"<string>\",\n \"salesforce\": \"<string>\",\n \"zendesk\": \"<string>\",\n \"zendesk_messaging\": \"<string>\",\n \"api\": \"<string>\",\n \"email\": \"<string>\",\n \"android_sdk\": \"<string>\",\n \"ios_sdk\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"model\": \"gpt-5.1\",\n \"temp\": 0.5,\n \"allowedDomains\": [\n \"<string>\"\n ],\n \"suggestedMessages\": [\n {\n \"text\": \"<string>\",\n \"type\": \"single\",\n \"order\": 123,\n \"icon\": \"<string>\"\n }\n ],\n \"initialMessages\": [\n \"<string>\"\n ],\n \"creditLimit\": 123,\n \"notificationsSettings\": {},\n \"ipRateLimits\": {\n \"limit\": 20,\n \"timeframe\": 240,\n \"message\": \"Too many messages in a row\"\n },\n \"voiceSettings\": {\n \"maxConcurrentSessions\": 5,\n \"maxCallDurationSeconds\": 900,\n \"maxDailyCallsPerUser\": 10,\n \"model\": \"gpt-4o-mini\",\n \"temperature\": 0,\n \"allowInterruptions\": true,\n \"allowTextInput\": true,\n \"endConversationAfterSilenceSeconds\": 300,\n \"initialMessage\": \"<string>\",\n \"errorMessage\": \"<string>\"\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://www.chatbase.co/api/v2/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"channelInstructions\": {\n \"chat_widget\": \"<string>\",\n \"help_page\": \"<string>\",\n \"center_stage\": \"<string>\",\n \"side_panel\": \"<string>\",\n \"slack\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"messenger\": \"<string>\",\n \"instagram\": \"<string>\",\n \"salesforce\": \"<string>\",\n \"zendesk\": \"<string>\",\n \"zendesk_messaging\": \"<string>\",\n \"api\": \"<string>\",\n \"email\": \"<string>\",\n \"android_sdk\": \"<string>\",\n \"ios_sdk\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"model\": \"gpt-5.1\",\n \"temp\": 0.5,\n \"allowedDomains\": [\n \"<string>\"\n ],\n \"suggestedMessages\": [\n {\n \"text\": \"<string>\",\n \"type\": \"single\",\n \"order\": 123,\n \"icon\": \"<string>\"\n }\n ],\n \"initialMessages\": [\n \"<string>\"\n ],\n \"creditLimit\": 123,\n \"notificationsSettings\": {},\n \"ipRateLimits\": {\n \"limit\": 20,\n \"timeframe\": 240,\n \"message\": \"Too many messages in a row\"\n },\n \"voiceSettings\": {\n \"maxConcurrentSessions\": 5,\n \"maxCallDurationSeconds\": 900,\n \"maxDailyCallsPerUser\": 10,\n \"model\": \"gpt-4o-mini\",\n \"temperature\": 0,\n \"allowInterruptions\": true,\n \"allowTextInput\": true,\n \"endConversationAfterSilenceSeconds\": 300,\n \"initialMessage\": \"<string>\",\n \"errorMessage\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.chatbase.co/api/v2/agents/{agentId}")
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 \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"channelInstructions\": {\n \"chat_widget\": \"<string>\",\n \"help_page\": \"<string>\",\n \"center_stage\": \"<string>\",\n \"side_panel\": \"<string>\",\n \"slack\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"messenger\": \"<string>\",\n \"instagram\": \"<string>\",\n \"salesforce\": \"<string>\",\n \"zendesk\": \"<string>\",\n \"zendesk_messaging\": \"<string>\",\n \"api\": \"<string>\",\n \"email\": \"<string>\",\n \"android_sdk\": \"<string>\",\n \"ios_sdk\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"model\": \"gpt-5.1\",\n \"temp\": 0.5,\n \"allowedDomains\": [\n \"<string>\"\n ],\n \"suggestedMessages\": [\n {\n \"text\": \"<string>\",\n \"type\": \"single\",\n \"order\": 123,\n \"icon\": \"<string>\"\n }\n ],\n \"initialMessages\": [\n \"<string>\"\n ],\n \"creditLimit\": 123,\n \"notificationsSettings\": {},\n \"ipRateLimits\": {\n \"limit\": 20,\n \"timeframe\": 240,\n \"message\": \"Too many messages in a row\"\n },\n \"voiceSettings\": {\n \"maxConcurrentSessions\": 5,\n \"maxCallDurationSeconds\": 900,\n \"maxDailyCallsPerUser\": 10,\n \"model\": \"gpt-4o-mini\",\n \"temperature\": 0,\n \"allowInterruptions\": true,\n \"allowTextInput\": true,\n \"endConversationAfterSilenceSeconds\": 300,\n \"initialMessage\": \"<string>\",\n \"errorMessage\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": {
"code": "VALIDATION_INVALID_BODY",
"message": "Invalid request"
}
}{
"error": {
"code": "AUTH_MISSING_API_KEY",
"message": "Authentication required"
}
}{
"error": {
"code": "SUBSCRIPTION_API_RESTRICTED_PLAN",
"message": "A Standard plan or higher is required to access the API"
}
}{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "Agent not found"
}
}{
"error": {
"code": "RATE_LIMIT_TOO_MANY_REQUESTS",
"message": "Too many requests, please try again later"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Something went wrong, please try again"
}
}{
"error": {
"code": "SERVICE_UNDER_MAINTENANCE",
"message": "The API is temporarily unavailable for scheduled maintenance, please try again later"
}
}Authorizations
API key from your account settings
Path Parameters
The agent ID
Minimum string length:
1Example:
"5QHA6VB-DIAbBhxwqxfdi"
Body
application/json
Agent name
Required string length:
1 - 100System prompt
Per-channel instruction overrides
Show child attributes
Show child attributes
AI model
Available options:
gpt-4o, gpt-4o-mini, o4-mini, gpt-oss-120b, gpt-oss-20b, gpt-5, gpt-5.1, gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.5, gpt-5.6-terra, gpt-5.6-luna, gpt-5-mini, gpt-5-nano, claude-opus-4-8, claude-opus-4-7, claude-opus-4-6, claude-sonnet-4-6, claude-opus-4-5, claude-haiku-4-5, claude-sonnet-4-5, gemini-2.5-pro, gemini-3-flash, gemini-3.1-flash-lite, gemini-3.1-pro, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.6-flash, grok-3, grok-3-mini, grok-4, DeepSeek-V3, DeepSeek-R1, DeepSeek-V4-Flash, Llama-4-Scout-17B-16E-Instruct, Llama-4-Maverick-17B-128E-Instruct-FP8, kimi-k2, mistral-medium-3.5, mistral-small-2603, glm-5.2 Example:
"gpt-5.1"
Temperature (0–1)
Required range:
0 <= x <= 1Visibility
Available options:
public, private Allowed embed domains
Suggested messages
- Option 1
- Option 2
Show child attributes
Show child attributes
Initial messages
Per-agent credit limit (null = no limit)
Email notification settings (null = disable all notifications)
Show child attributes
Show child attributes
IP-based rate limit settings (partial update; null = reset to defaults)
Show child attributes
Show child attributes
Voice mode configuration (null = disable voice mode)
Show child attributes
Show child attributes
Response
Agent updated
Available options:
true ⌘I
