Updates the agent's latest version. Send only the fields you want to change; they are merged over the stored values and the result is validated as a whole. If the latest version is published, a new draft (latest version + 1) is created with the change, and the published version stays as it was.
Request#
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | The agent. |
Body#
Any field of Create agent, all optional. Top-level fields replace the stored value; nested objects such as voicemail_option are replaced whole, not merged. When response_engine changes, the new engine must exist.
Example request#
curl -X PATCH "https://api.tried.com.au/update-agent/agent_3f9a1c0b2d4e5f6a7b8c9d0e" \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice_speed": 1.1,
"boosted_keywords": [
"Bright Dental",
"Invisalign"
]
}'const res = await fetch("https://api.tried.com.au/update-agent/agent_3f9a1c0b2d4e5f6a7b8c9d0e", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"voice_speed": 1.1,
"boosted_keywords": [
"Bright Dental",
"Invisalign"
]
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.tried.com.au/update-agent/agent_3f9a1c0b2d4e5f6a7b8c9d0e",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
json={
"voice_speed": 1.1,
"boosted_keywords": ["Bright Dental", "Invisalign"],
},
)
data = res.json()Response#
200 OK with the updated agent. Check version to see whether a new draft was created.
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 agents scope. |
404 |
The agent, or a new response_engine target, does not exist. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.