Skip to content
TriedDocs
Chats and SMS

Get chat

Retrieve one chat with its messages and analysis.

GEThttps://api.tried.com.au/get-chat/{chat_id}

Returns a chat in your workspace, including agent_name.

Request#

Path parameters#

Parameter Type Required Description
chat_id string Yes The chat ID.

Example request#

curl "https://api.tried.com.au/get-chat/chat_0a1b2c3d4e5f6a7b8c9d0e1f" \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch("https://api.tried.com.au/get-chat/chat_0a1b2c3d4e5f6a7b8c9d0e1f", {
  headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const data = await res.json();
import os, requests

res = requests.get(
    "https://api.tried.com.au/get-chat/chat_0a1b2c3d4e5f6a7b8c9d0e1f",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
data = res.json()

Response#

200 OK with the chat object.

{
  "chat_id": "chat_0a1b2c3d4e5f6a7b8c9d0e1f",
  "chat_agent_id": "chat_agent_6a7b8c9d0e1f2a3b4c5d6e7f",
  "agent_name": "Support chat",
  "chat_type": "api_chat",
  "channel": "api",
  "chat_status": "ended",
  "retell_llm_dynamic_variables": { "customer_name": "Sam" },
  "metadata": {},
  "start_timestamp": 1792310400000,
  "end_timestamp": 1792310520000,
  "transcript": "Agent: Hi Sam, how can I help?\nUser: Can I move my booking to Friday?\nAgent: Friday at 10 am or 3 pm are free.",
  "message_with_tool_calls": [],
  "chat_analysis": { "chat_summary": "Sam asked to move a booking to Friday.", "chat_successful": true, "user_sentiment": "Neutral", "custom_analysis_data": {} },
  "chat_cost": { "combined_cost": 0.006 }
}

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 chat with this ID in the workspace.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.