Update chat agent
curl --request PATCH \
--url https://api.upon-ai.com/api/chat-agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": 42,
"agent_name": "Website Concierge Draft",
"auto_close_message": "I can follow up again whenever you need.",
"is_public": false,
"handbook_config": {
"enabled": true,
"include_sections": [
"escalation",
"billing"
]
}
}
'import requests
url = "https://api.upon-ai.com/api/chat-agents/{agentId}"
payload = {
"workspaceId": 42,
"agent_name": "Website Concierge Draft",
"auto_close_message": "I can follow up again whenever you need.",
"is_public": False,
"handbook_config": {
"enabled": True,
"include_sections": ["escalation", "billing"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: 42,
agent_name: 'Website Concierge Draft',
auto_close_message: 'I can follow up again whenever you need.',
is_public: false,
handbook_config: {enabled: true, include_sections: ['escalation', 'billing']}
})
};
fetch('https://api.upon-ai.com/api/chat-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://api.upon-ai.com/api/chat-agents/{agentId}",
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([
'workspaceId' => 42,
'agent_name' => 'Website Concierge Draft',
'auto_close_message' => 'I can follow up again whenever you need.',
'is_public' => false,
'handbook_config' => [
'enabled' => true,
'include_sections' => [
'escalation',
'billing'
]
]
]),
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.upon-ai.com/api/chat-agents/{agentId}"
payload := strings.NewReader("{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge Draft\",\n \"auto_close_message\": \"I can follow up again whenever you need.\",\n \"is_public\": false,\n \"handbook_config\": {\n \"enabled\": true,\n \"include_sections\": [\n \"escalation\",\n \"billing\"\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.upon-ai.com/api/chat-agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge Draft\",\n \"auto_close_message\": \"I can follow up again whenever you need.\",\n \"is_public\": false,\n \"handbook_config\": {\n \"enabled\": true,\n \"include_sections\": [\n \"escalation\",\n \"billing\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upon-ai.com/api/chat-agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge Draft\",\n \"auto_close_message\": \"I can follow up again whenever you need.\",\n \"is_public\": false,\n \"handbook_config\": {\n \"enabled\": true,\n \"include_sections\": [\n \"escalation\",\n \"billing\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"agent_name": "<string>",
"version": 123,
"response_engine": {
"type": "<string>",
"llm_id": "<string>"
},
"auto_close_message": "<string>",
"is_public": true,
"end_chat_after_silence_ms": 123,
"webhook_url": "<string>",
"webhook_events": [
"<string>"
],
"timezone": "<string>",
"data_storage_setting": "<string>",
"data_storage_retention_days": 123,
"post_chat_analysis_model": "<string>",
"post_chat_analysis_data": [
{}
],
"uponai_dynamic_variables": {}
}Chat Agents
Update chat agent
Apply partial updates to an existing chat agent configuration.
PATCH
/
api
/
chat-agents
/
{agentId}
Update chat agent
curl --request PATCH \
--url https://api.upon-ai.com/api/chat-agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": 42,
"agent_name": "Website Concierge Draft",
"auto_close_message": "I can follow up again whenever you need.",
"is_public": false,
"handbook_config": {
"enabled": true,
"include_sections": [
"escalation",
"billing"
]
}
}
'import requests
url = "https://api.upon-ai.com/api/chat-agents/{agentId}"
payload = {
"workspaceId": 42,
"agent_name": "Website Concierge Draft",
"auto_close_message": "I can follow up again whenever you need.",
"is_public": False,
"handbook_config": {
"enabled": True,
"include_sections": ["escalation", "billing"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: 42,
agent_name: 'Website Concierge Draft',
auto_close_message: 'I can follow up again whenever you need.',
is_public: false,
handbook_config: {enabled: true, include_sections: ['escalation', 'billing']}
})
};
fetch('https://api.upon-ai.com/api/chat-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://api.upon-ai.com/api/chat-agents/{agentId}",
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([
'workspaceId' => 42,
'agent_name' => 'Website Concierge Draft',
'auto_close_message' => 'I can follow up again whenever you need.',
'is_public' => false,
'handbook_config' => [
'enabled' => true,
'include_sections' => [
'escalation',
'billing'
]
]
]),
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.upon-ai.com/api/chat-agents/{agentId}"
payload := strings.NewReader("{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge Draft\",\n \"auto_close_message\": \"I can follow up again whenever you need.\",\n \"is_public\": false,\n \"handbook_config\": {\n \"enabled\": true,\n \"include_sections\": [\n \"escalation\",\n \"billing\"\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.upon-ai.com/api/chat-agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge Draft\",\n \"auto_close_message\": \"I can follow up again whenever you need.\",\n \"is_public\": false,\n \"handbook_config\": {\n \"enabled\": true,\n \"include_sections\": [\n \"escalation\",\n \"billing\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upon-ai.com/api/chat-agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge Draft\",\n \"auto_close_message\": \"I can follow up again whenever you need.\",\n \"is_public\": false,\n \"handbook_config\": {\n \"enabled\": true,\n \"include_sections\": [\n \"escalation\",\n \"billing\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"agent_name": "<string>",
"version": 123,
"response_engine": {
"type": "<string>",
"llm_id": "<string>"
},
"auto_close_message": "<string>",
"is_public": true,
"end_chat_after_silence_ms": 123,
"webhook_url": "<string>",
"webhook_events": [
"<string>"
],
"timezone": "<string>",
"data_storage_setting": "<string>",
"data_storage_retention_days": 123,
"post_chat_analysis_model": "<string>",
"post_chat_analysis_data": [
{}
],
"uponai_dynamic_variables": {}
}Authorizations
Generate tokens from your profile settings at app.uponai.com.
Path Parameters
Agent identifier.
Query Parameters
Specific version to retrieve or update.
Required range:
x >= 1Body
application/json
Response
200 - application/json
Updated chat agent.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I