Skip to main content
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"
  }
}
'
{
  "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": {}
}

Documentation Index

Fetch the complete documentation index at: https://documentation.uponai.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Generate tokens from your profile settings at app.uponai.com.

Body

application/json
workspaceId
integer
required
agent_name
string
required
response_engine
object
required
auto_close_message
string
end_chat_after_silence_ms
integer
webhook_url
string<uri>
webhook_events
string[]
timezone
string
is_public
boolean
data_storage_setting
string
data_storage_retention_days
integer
post_chat_analysis_model
string
post_chat_analysis_data
object[]
uponai_dynamic_variables
object

Response

201 - application/json

Newly created chat agent.

agent_id
string
agent_name
string
version
integer
response_engine
object
auto_close_message
string | null
is_public
boolean
end_chat_after_silence_ms
integer | null
webhook_url
string<uri> | null
webhook_events
string[]
timezone
string | null
data_storage_setting
string | null
data_storage_retention_days
integer | null
post_chat_analysis_model
string | null
post_chat_analysis_data
object[]
uponai_dynamic_variables
object