Skip to content
TriedDocs
Voice agents

Delete agent version

Delete one draft version of an agent.

DELETEhttps://api.tried.com.au/agent-versions/{agent_id}/{version}

Deletes a single draft version. Published versions, the agent's only version and versions an environment tag points at cannot be deleted.

Request#

Path parameters#

Parameter Type Required Description
agent_id string Yes The agent.
version integer Yes The draft to delete.

Example request#

curl -X DELETE "https://api.tried.com.au/agent-versions/agent_3f9a1c0b2d4e5f6a7b8c9d0e/2" \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch("https://api.tried.com.au/agent-versions/agent_3f9a1c0b2d4e5f6a7b8c9d0e/2", {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
console.log(res.status); // 204
import os, requests

res = requests.delete(
    "https://api.tried.com.au/agent-versions/agent_3f9a1c0b2d4e5f6a7b8c9d0e/2",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
print(res.status_code)

Response#

204 No Content.

Errors#

Status When
400 The version is published, it is the agent's only version, or it is tagged (Version 2 is tagged staging).
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 version does not exist.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.