Skip to main content
POST
/
api
/
chats
Create chat
curl --request POST \
  --url https://api.upon-ai.com/api/chats \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": 42,
  "agent_id": "chat_agent_01hzk4q6dr3n0d4qzpw9z6gth6",
  "metadata": {
    "source": "website",
    "page": "/pricing"
  },
  "uponai_dynamic_variables": {
    "customer_tier": "enterprise"
  }
}
'
{
  "chatId": "<string>",
  "agentId": "<string>",
  "version": 123,
  "status": "<string>",
  "type": "web_chat",
  "metadata": {},
  "customAttributes": {},
  "startedAt": "2023-11-07T05:31:56Z",
  "endedAt": "2023-11-07T05:31:56Z",
  "transcript": "<string>",
  "messages": [
    {
      "content": "<string>",
      "name": "<string>",
      "tool_calls": [
        {}
      ]
    }
  ],
  "chatCost": {},
  "chatAnalysis": {},
  "collectedDynamicVariables": {},
  "uponai_dynamic_variables": {},
  "overrideDynamicVariables": {}
}

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_id
string
required
metadata
object
uponai_dynamic_variables
object

Response

201 - application/json

Chat created.

chatId
string
agentId
string
version
integer
status
string
type
string
Example:

"web_chat"

metadata
object
customAttributes
object
startedAt
string<date-time> | null
endedAt
string<date-time> | null
transcript
string | null
messages
object[]
chatCost
object
chatAnalysis
object
collectedDynamicVariables
object
uponai_dynamic_variables
object
overrideDynamicVariables
object