Creates a new chat agent from the latest version of a voice agent. It copies the response engine (without a pinned version), post_call_analysis_data, post_call_analysis_model, the summary and success analysis prompts, and webhook_url. The name is the voice agent's name plus (chat).
Request#
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | The voice agent. |
Example request#
curl -X POST "https://api.tried.com.au/convert-agent-to-chat/agent_3f9a1c0b2d4e5f6a7b8c9d0e" \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/convert-agent-to-chat/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/convert-agent-to-chat/agent_3f9a1c0b2d4e5f6a7b8c9d0e",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
data = res.json()Response#
201 Created with the new chat agent.
Errors#
| Status | When |
|---|---|
400 |
The voice agent uses a custom LLM engine, which chat agents do not support. |
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 voice agent or its engine does not exist. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.