Returns chats sorted by start time, newest first. Filter with query parameters.
Request#
Query parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_agent_id |
string | No | Only chats of this chat agent. |
status |
string | No | ongoing or ended. |
channel |
string | No | api or widget. |
limit |
integer | No | 1 to 1000. Default 200. |
Example request#
curl "https://api.tried.com.au/list-chats?status=ended&limit=50" \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/list-chats?status=ended&limit=50", {
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.tried.com.au/list-chats?status=ended&limit=50",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
data = res.json()Response#
200 OK with an array of chat objects, each with agent_name. There is no cursor: narrow the filters or raise limit to see more.
Errors#
| Status | When |
|---|---|
400 |
A query parameter is invalid. |
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the calls scope. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.