Publishes the agent's latest version and returns it. In one step:
- If the agent's engine is a Retell LLM or conversation flow without a pinned
version, that engine's draft is published too, and the published agent pins the engine version. - The agent's latest version is marked published. Published versions are read-only.
- A new draft is created at version + 1 with the same settings (the engine reference stays unpinned in the draft).
If the latest version is already published, nothing changes and that version is returned.
Request#
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | The agent. |
The request body is ignored.
Example request#
curl -X POST "https://api.tried.com.au/publish-agent-version/agent_3f9a1c0b2d4e5f6a7b8c9d0e" \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/publish-agent-version/agent_3f9a1c0b2d4e5f6a7b8c9d0e", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.tried.com.au/publish-agent-version/agent_3f9a1c0b2d4e5f6a7b8c9d0e",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
data = res.json()Response#
200 OK with the published version.
{
"agent_id": "agent_3f9a1c0b2d4e5f6a7b8c9d0e",
"version": 3,
"is_published": true,
"agent_name": "Bright Dental receptionist",
"response_engine": { "type": "retell-llm", "llm_id": "llm_9c8b7a6f5e4d3c2b1a0f9e8d", "version": 5 },
"last_modification_timestamp": 1792310400000
}The example is shortened; the response is a full agent.
Errors#
| Status | When |
|---|---|
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 does not exist. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.
Compatibility notes#
Tried always publishes the latest version and ignores the body. To publish an older draft, make it the latest with Create agent version first.