Updates one draft version. When several drafts exist, this lets you edit an older one in place. If version is the latest version, the request behaves like Update agent. Beyond Retell
Request#
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | The agent. |
version |
integer | Yes | A draft version. |
Body#
Any field of Create agent, all optional. Fields are merged over the stored version and validated as a whole.
Example request#
curl -X PATCH "https://api.tried.com.au/agent-versions/agent_3f9a1c0b2d4e5f6a7b8c9d0e/2" \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"interruption_sensitivity": 0.7
}'const res = await fetch("https://api.tried.com.au/agent-versions/agent_3f9a1c0b2d4e5f6a7b8c9d0e/2", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"interruption_sensitivity": 0.7
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.tried.com.au/agent-versions/agent_3f9a1c0b2d4e5f6a7b8c9d0e/2",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
json={
"interruption_sensitivity": 0.7,
},
)
data = res.json()Response#
200 OK with the updated agent version.
Errors#
| Status | When |
|---|---|
400 |
Validation failed, the version does not exist (Version 2 not found), or the version is published (Published versions are read-only. Create a draft from it.). |
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the agents scope. |
404 |
version is the latest version and a new response_engine target does not exist. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.