Skip to main content
PATCH
/
api
/
chats
/
{chatId}
Update chat
curl --request PATCH \
  --url https://api.upon-ai.com/api/chats/{chatId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": 42,
  "metadata": {
    "followUpOwner": "support"
  },
  "custom_attributes": {
    "customerId": "cust_123"
  },
  "override_dynamic_variables": {
    "discount_code": "SPRING15"
  }
}
'
{
  "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": {}
}

Authorizations

Authorization
string
header
required

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

Path Parameters

chatId
string
required

Chat identifier.

Body

application/json
workspaceId
integer
required
metadata
object
custom_attributes
object
override_dynamic_variables
object

Response

200 - application/json

Updated chat session.

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