Merges the fields you send over the stored chat agent and validates the result. Changes apply to new turns of every chat right away. Published snapshots are not affected.
Request#
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_agent_id |
string | Yes | The chat agent. |
Body#
Any field of Create chat agent, all optional. When response_engine changes, the new engine must exist.
Example request#
curl -X PATCH "https://api.tried.com.au/update-chat-agent/chat_agent_6a7b8c9d0e1f2a3b4c5d6e7f" \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webhook_url": "https://example.com/tried/chat-webhook"
}'const res = await fetch("https://api.tried.com.au/update-chat-agent/chat_agent_6a7b8c9d0e1f2a3b4c5d6e7f", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"webhook_url": "https://example.com/tried/chat-webhook"
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.tried.com.au/update-chat-agent/chat_agent_6a7b8c9d0e1f2a3b4c5d6e7f",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
json={
"webhook_url": "https://example.com/tried/chat-webhook",
},
)
data = res.json()Response#
200 OK with the updated chat agent.
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 |
The chat agent, or a new engine, does not exist. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.