Create chat agent
curl --request POST \
--url https://api.upon-ai.com/api/chat-agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": 42,
"agent_name": "Website Concierge",
"response_engine": {
"type": "uponai-llm",
"llm_id": "llm_1ab234cde567fgh"
},
"auto_close_message": "Thanks for chatting with UponAI.",
"end_chat_after_silence_ms": 600000,
"webhook_url": "https://example.com/hooks/chat-events",
"webhook_events": [
"chat_started",
"chat_ended",
"chat_analyzed"
],
"timezone": "America/New_York",
"is_public": true,
"data_storage_setting": "everything_except_pii",
"data_storage_retention_days": 30,
"post_chat_analysis_model": "gpt-4.1-mini",
"post_chat_analysis_data": [
{
"type": "chat_summary",
"name": "summary",
"description": "Short summary of the completed chat."
}
],
"uponai_dynamic_variables": {
"customer_tier": "enterprise"
}
}
'import requests
url = "https://api.upon-ai.com/api/chat-agents"
payload = {
"workspaceId": 42,
"agent_name": "Website Concierge",
"response_engine": {
"type": "uponai-llm",
"llm_id": "llm_1ab234cde567fgh"
},
"auto_close_message": "Thanks for chatting with UponAI.",
"end_chat_after_silence_ms": 600000,
"webhook_url": "https://example.com/hooks/chat-events",
"webhook_events": ["chat_started", "chat_ended", "chat_analyzed"],
"timezone": "America/New_York",
"is_public": True,
"data_storage_setting": "everything_except_pii",
"data_storage_retention_days": 30,
"post_chat_analysis_model": "gpt-4.1-mini",
"post_chat_analysis_data": [
{
"type": "chat_summary",
"name": "summary",
"description": "Short summary of the completed chat."
}
],
"uponai_dynamic_variables": { "customer_tier": "enterprise" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: 42,
agent_name: 'Website Concierge',
response_engine: {type: 'uponai-llm', llm_id: 'llm_1ab234cde567fgh'},
auto_close_message: 'Thanks for chatting with UponAI.',
end_chat_after_silence_ms: 600000,
webhook_url: 'https://example.com/hooks/chat-events',
webhook_events: ['chat_started', 'chat_ended', 'chat_analyzed'],
timezone: 'America/New_York',
is_public: true,
data_storage_setting: 'everything_except_pii',
data_storage_retention_days: 30,
post_chat_analysis_model: 'gpt-4.1-mini',
post_chat_analysis_data: [
{
type: 'chat_summary',
name: 'summary',
description: 'Short summary of the completed chat.'
}
],
uponai_dynamic_variables: {customer_tier: 'enterprise'}
})
};
fetch('https://api.upon-ai.com/api/chat-agents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workspaceId' => 42,
'agent_name' => 'Website Concierge',
'response_engine' => [
'type' => 'uponai-llm',
'llm_id' => 'llm_1ab234cde567fgh'
],
'auto_close_message' => 'Thanks for chatting with UponAI.',
'end_chat_after_silence_ms' => 600000,
'webhook_url' => 'https://example.com/hooks/chat-events',
'webhook_events' => [
'chat_started',
'chat_ended',
'chat_analyzed'
],
'timezone' => 'America/New_York',
'is_public' => true,
'data_storage_setting' => 'everything_except_pii',
'data_storage_retention_days' => 30,
'post_chat_analysis_model' => 'gpt-4.1-mini',
'post_chat_analysis_data' => [
[
'type' => 'chat_summary',
'name' => 'summary',
'description' => 'Short summary of the completed chat.'
]
],
'uponai_dynamic_variables' => [
'customer_tier' => 'enterprise'
]
]),
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"
payload := strings.NewReader("{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge\",\n \"response_engine\": {\n \"type\": \"uponai-llm\",\n \"llm_id\": \"llm_1ab234cde567fgh\"\n },\n \"auto_close_message\": \"Thanks for chatting with UponAI.\",\n \"end_chat_after_silence_ms\": 600000,\n \"webhook_url\": \"https://example.com/hooks/chat-events\",\n \"webhook_events\": [\n \"chat_started\",\n \"chat_ended\",\n \"chat_analyzed\"\n ],\n \"timezone\": \"America/New_York\",\n \"is_public\": true,\n \"data_storage_setting\": \"everything_except_pii\",\n \"data_storage_retention_days\": 30,\n \"post_chat_analysis_model\": \"gpt-4.1-mini\",\n \"post_chat_analysis_data\": [\n {\n \"type\": \"chat_summary\",\n \"name\": \"summary\",\n \"description\": \"Short summary of the completed chat.\"\n }\n ],\n \"uponai_dynamic_variables\": {\n \"customer_tier\": \"enterprise\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.upon-ai.com/api/chat-agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge\",\n \"response_engine\": {\n \"type\": \"uponai-llm\",\n \"llm_id\": \"llm_1ab234cde567fgh\"\n },\n \"auto_close_message\": \"Thanks for chatting with UponAI.\",\n \"end_chat_after_silence_ms\": 600000,\n \"webhook_url\": \"https://example.com/hooks/chat-events\",\n \"webhook_events\": [\n \"chat_started\",\n \"chat_ended\",\n \"chat_analyzed\"\n ],\n \"timezone\": \"America/New_York\",\n \"is_public\": true,\n \"data_storage_setting\": \"everything_except_pii\",\n \"data_storage_retention_days\": 30,\n \"post_chat_analysis_model\": \"gpt-4.1-mini\",\n \"post_chat_analysis_data\": [\n {\n \"type\": \"chat_summary\",\n \"name\": \"summary\",\n \"description\": \"Short summary of the completed chat.\"\n }\n ],\n \"uponai_dynamic_variables\": {\n \"customer_tier\": \"enterprise\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upon-ai.com/api/chat-agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge\",\n \"response_engine\": {\n \"type\": \"uponai-llm\",\n \"llm_id\": \"llm_1ab234cde567fgh\"\n },\n \"auto_close_message\": \"Thanks for chatting with UponAI.\",\n \"end_chat_after_silence_ms\": 600000,\n \"webhook_url\": \"https://example.com/hooks/chat-events\",\n \"webhook_events\": [\n \"chat_started\",\n \"chat_ended\",\n \"chat_analyzed\"\n ],\n \"timezone\": \"America/New_York\",\n \"is_public\": true,\n \"data_storage_setting\": \"everything_except_pii\",\n \"data_storage_retention_days\": 30,\n \"post_chat_analysis_model\": \"gpt-4.1-mini\",\n \"post_chat_analysis_data\": [\n {\n \"type\": \"chat_summary\",\n \"name\": \"summary\",\n \"description\": \"Short summary of the completed chat.\"\n }\n ],\n \"uponai_dynamic_variables\": {\n \"customer_tier\": \"enterprise\"\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
Create chat agent
Create a new UponAI chat agent for browser and messaging use cases.
POST
/
api
/
chat-agents
Create chat agent
curl --request POST \
--url https://api.upon-ai.com/api/chat-agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": 42,
"agent_name": "Website Concierge",
"response_engine": {
"type": "uponai-llm",
"llm_id": "llm_1ab234cde567fgh"
},
"auto_close_message": "Thanks for chatting with UponAI.",
"end_chat_after_silence_ms": 600000,
"webhook_url": "https://example.com/hooks/chat-events",
"webhook_events": [
"chat_started",
"chat_ended",
"chat_analyzed"
],
"timezone": "America/New_York",
"is_public": true,
"data_storage_setting": "everything_except_pii",
"data_storage_retention_days": 30,
"post_chat_analysis_model": "gpt-4.1-mini",
"post_chat_analysis_data": [
{
"type": "chat_summary",
"name": "summary",
"description": "Short summary of the completed chat."
}
],
"uponai_dynamic_variables": {
"customer_tier": "enterprise"
}
}
'import requests
url = "https://api.upon-ai.com/api/chat-agents"
payload = {
"workspaceId": 42,
"agent_name": "Website Concierge",
"response_engine": {
"type": "uponai-llm",
"llm_id": "llm_1ab234cde567fgh"
},
"auto_close_message": "Thanks for chatting with UponAI.",
"end_chat_after_silence_ms": 600000,
"webhook_url": "https://example.com/hooks/chat-events",
"webhook_events": ["chat_started", "chat_ended", "chat_analyzed"],
"timezone": "America/New_York",
"is_public": True,
"data_storage_setting": "everything_except_pii",
"data_storage_retention_days": 30,
"post_chat_analysis_model": "gpt-4.1-mini",
"post_chat_analysis_data": [
{
"type": "chat_summary",
"name": "summary",
"description": "Short summary of the completed chat."
}
],
"uponai_dynamic_variables": { "customer_tier": "enterprise" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: 42,
agent_name: 'Website Concierge',
response_engine: {type: 'uponai-llm', llm_id: 'llm_1ab234cde567fgh'},
auto_close_message: 'Thanks for chatting with UponAI.',
end_chat_after_silence_ms: 600000,
webhook_url: 'https://example.com/hooks/chat-events',
webhook_events: ['chat_started', 'chat_ended', 'chat_analyzed'],
timezone: 'America/New_York',
is_public: true,
data_storage_setting: 'everything_except_pii',
data_storage_retention_days: 30,
post_chat_analysis_model: 'gpt-4.1-mini',
post_chat_analysis_data: [
{
type: 'chat_summary',
name: 'summary',
description: 'Short summary of the completed chat.'
}
],
uponai_dynamic_variables: {customer_tier: 'enterprise'}
})
};
fetch('https://api.upon-ai.com/api/chat-agents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workspaceId' => 42,
'agent_name' => 'Website Concierge',
'response_engine' => [
'type' => 'uponai-llm',
'llm_id' => 'llm_1ab234cde567fgh'
],
'auto_close_message' => 'Thanks for chatting with UponAI.',
'end_chat_after_silence_ms' => 600000,
'webhook_url' => 'https://example.com/hooks/chat-events',
'webhook_events' => [
'chat_started',
'chat_ended',
'chat_analyzed'
],
'timezone' => 'America/New_York',
'is_public' => true,
'data_storage_setting' => 'everything_except_pii',
'data_storage_retention_days' => 30,
'post_chat_analysis_model' => 'gpt-4.1-mini',
'post_chat_analysis_data' => [
[
'type' => 'chat_summary',
'name' => 'summary',
'description' => 'Short summary of the completed chat.'
]
],
'uponai_dynamic_variables' => [
'customer_tier' => 'enterprise'
]
]),
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"
payload := strings.NewReader("{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge\",\n \"response_engine\": {\n \"type\": \"uponai-llm\",\n \"llm_id\": \"llm_1ab234cde567fgh\"\n },\n \"auto_close_message\": \"Thanks for chatting with UponAI.\",\n \"end_chat_after_silence_ms\": 600000,\n \"webhook_url\": \"https://example.com/hooks/chat-events\",\n \"webhook_events\": [\n \"chat_started\",\n \"chat_ended\",\n \"chat_analyzed\"\n ],\n \"timezone\": \"America/New_York\",\n \"is_public\": true,\n \"data_storage_setting\": \"everything_except_pii\",\n \"data_storage_retention_days\": 30,\n \"post_chat_analysis_model\": \"gpt-4.1-mini\",\n \"post_chat_analysis_data\": [\n {\n \"type\": \"chat_summary\",\n \"name\": \"summary\",\n \"description\": \"Short summary of the completed chat.\"\n }\n ],\n \"uponai_dynamic_variables\": {\n \"customer_tier\": \"enterprise\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.upon-ai.com/api/chat-agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge\",\n \"response_engine\": {\n \"type\": \"uponai-llm\",\n \"llm_id\": \"llm_1ab234cde567fgh\"\n },\n \"auto_close_message\": \"Thanks for chatting with UponAI.\",\n \"end_chat_after_silence_ms\": 600000,\n \"webhook_url\": \"https://example.com/hooks/chat-events\",\n \"webhook_events\": [\n \"chat_started\",\n \"chat_ended\",\n \"chat_analyzed\"\n ],\n \"timezone\": \"America/New_York\",\n \"is_public\": true,\n \"data_storage_setting\": \"everything_except_pii\",\n \"data_storage_retention_days\": 30,\n \"post_chat_analysis_model\": \"gpt-4.1-mini\",\n \"post_chat_analysis_data\": [\n {\n \"type\": \"chat_summary\",\n \"name\": \"summary\",\n \"description\": \"Short summary of the completed chat.\"\n }\n ],\n \"uponai_dynamic_variables\": {\n \"customer_tier\": \"enterprise\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upon-ai.com/api/chat-agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": 42,\n \"agent_name\": \"Website Concierge\",\n \"response_engine\": {\n \"type\": \"uponai-llm\",\n \"llm_id\": \"llm_1ab234cde567fgh\"\n },\n \"auto_close_message\": \"Thanks for chatting with UponAI.\",\n \"end_chat_after_silence_ms\": 600000,\n \"webhook_url\": \"https://example.com/hooks/chat-events\",\n \"webhook_events\": [\n \"chat_started\",\n \"chat_ended\",\n \"chat_analyzed\"\n ],\n \"timezone\": \"America/New_York\",\n \"is_public\": true,\n \"data_storage_setting\": \"everything_except_pii\",\n \"data_storage_retention_days\": 30,\n \"post_chat_analysis_model\": \"gpt-4.1-mini\",\n \"post_chat_analysis_data\": [\n {\n \"type\": \"chat_summary\",\n \"name\": \"summary\",\n \"description\": \"Short summary of the completed chat.\"\n }\n ],\n \"uponai_dynamic_variables\": {\n \"customer_tier\": \"enterprise\"\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.
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
201 - application/json
Newly created chat agent.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I