Merges new values into a chat's metadata or dynamic variables. New variables apply to the agent's next turn on an ongoing chat.
Request#
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id |
string | Yes | The chat. |
Body#
| Field | Type | Required | Description |
|---|---|---|---|
metadata |
object | No | Merged over the existing metadata. |
override_dynamic_variables |
object | No | Merged over retell_llm_dynamic_variables. Non-string values are stored as JSON strings. |
Example request#
curl -X PATCH "https://api.tried.com.au/update-chat/chat_0a1b2c3d4e5f6a7b8c9d0e1f" \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"resolved": true
}
}'const res = await fetch("https://api.tried.com.au/update-chat/chat_0a1b2c3d4e5f6a7b8c9d0e1f", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"metadata": {
"resolved": true
}
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.tried.com.au/update-chat/chat_0a1b2c3d4e5f6a7b8c9d0e1f",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
json={
"metadata": {
"resolved": True,
},
},
)
data = res.json()Response#
200 OK with the updated chat object.
Errors#
| Status | When |
|---|---|
400 |
Validation failed. |
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the calls scope. |
404 |
No chat with this ID in the workspace. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.