Skip to content
TriedDocs
Chat agents

Restore chat agent version

Roll a chat agent back to a published version.

POSThttps://api.tried.com.au/restore-chat-agent-version/{chat_agent_id}/{version}

Replaces the chat agent's current configuration and name with a published version. New chat turns use the restored configuration right away.

Request#

Path parameters#

Parameter Type Required Description
chat_agent_id string Yes The chat agent.
version integer Yes A published version.

Example request#

curl -X POST "https://api.tried.com.au/restore-chat-agent-version/chat_agent_6a7b8c9d0e1f2a3b4c5d6e7f/2" \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch("https://api.tried.com.au/restore-chat-agent-version/chat_agent_6a7b8c9d0e1f2a3b4c5d6e7f/2", {
  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/restore-chat-agent-version/chat_agent_6a7b8c9d0e1f2a3b4c5d6e7f/2",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
data = res.json()

Response#

200 OK with the updated chat 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 calls scope.
404 No published version with this number.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.