Skip to content
TriedDocs
Chats and SMS

Rerun chat analysis

Run post-chat analysis again on an ended chat.

POSThttps://api.tried.com.au/rerun-chat-analysis/{chat_id}

Runs post-chat analysis again with the chat agent's current post_chat_analysis_data, post_chat_analysis_model and analysis prompts, then sends the chat_analyzed webhook.

Request#

Path parameters#

Parameter Type Required Description
chat_id string Yes An ended chat.

Example request#

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

Response#

200 OK with the chat object and its new chat_analysis.

Errors#

Status When
400 The chat has not ended.
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 chat with this ID in the workspace.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.