curl --request GET \
--url https://app.cassidyai.com/api/admin/v1/chats \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cassidyai.com/api/admin/v1/chats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cassidyai.com/api/admin/v1/chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cassidyai.com/api/admin/v1/chats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cassidyai.com/api/admin/v1/chats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.cassidyai.com/api/admin/v1/chats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cassidyai.com/api/admin/v1/chats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"nextCursor": "<string>",
"chats": [
{
"id": "<string>",
"name": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"source": "web",
"createdAt": "<string>",
"lastActivityAt": "<string>",
"credits": 123
}
]
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}List chats
Lists Agent chats started in the range, newest first.
Each chat includes
- Its name and most recent Agent
- The person who started it
- Where it happened (
source), such asweb,slack,teams, orembedded - When it started and when it was last active
- The credits it used
Filter by person, Agent, model, or source. Agent and model filters match the chat’s most recent Agent, so a chat that switched Agents is listed under the one it uses now. Page through results with cursor.
Excludes chats run by Workflows and Agent test chats. Messages are not included.
Requires the Chats permission (chats:read).
curl --request GET \
--url https://app.cassidyai.com/api/admin/v1/chats \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cassidyai.com/api/admin/v1/chats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cassidyai.com/api/admin/v1/chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cassidyai.com/api/admin/v1/chats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cassidyai.com/api/admin/v1/chats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.cassidyai.com/api/admin/v1/chats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cassidyai.com/api/admin/v1/chats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"nextCursor": "<string>",
"chats": [
{
"id": "<string>",
"name": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"source": "web",
"createdAt": "<string>",
"lastActivityAt": "<string>",
"credits": 123
}
]
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
An Admin API key, starting with cas_admin_.
Query Parameters
Inclusive start of the range, by creation time, as an ISO 8601 timestamp.
Exclusive end of the range as an ISO 8601 timestamp. The range can span at most 31 days.
Maximum number of records to return.
1 <= x <= 1000The nextCursor from the previous page.
Only include these Agents, using the IDs from the agent breakdown or /chats. Built-in models combine their thinking levels. Pass several as a comma-separated list.
20Leave out these Agents. Pass several as a comma-separated list.
20Only include Agents that use these models, such as claude-opus-5-5, including the built-in model's own Agent. Agents count as the model they use today, so changing an Agent's model moves its past usage too. Thinking levels are combined. Pass several as a comma-separated list.
20Leave out Agents that use these models. Pass several as a comma-separated list.
20Only list chats started by this user.
Only list chats from this source, such as slack or web.
web, slack, teams, googleChat, embedded, email, api