cURL
curl -X GET "https://app.cotool.ai/api/agents/:agentId/chats" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/agents/{agentId}/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.cotool.ai/api/agents/{agentId}/chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://app.cotool.ai/api/agents/{agentId}/chats")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/agents/{agentId}/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))
}{
"chats": [
{
"id": "<string>",
"organizationId": "<string>",
"title": "<string>",
"createdAt": "2025-06-17T12:34:56.789Z",
"updatedAt": "2025-06-17T12:34:56.789Z",
"modelAlias": "<unknown>",
"userId": "<string>",
"agentId": "<string>",
"detectionId": "<string>",
"parentChatId": "<string>",
"triggerId": "<string>",
"triggerName": "<string>",
"triggerSource": "<string>",
"triggerDescription": "<string>",
"statusMessage": "<string>",
"result": "<string>",
"structuredOutputSchema": {
"title": "<string>",
"description": "<string>",
"properties": {},
"items": "<unknown>",
"required": [
"<string>"
],
"enum": [
"<string>"
],
"additionalProperties": true,
"x-cotool": {
"viewerId": "<string>"
}
},
"shareToken": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isPinned": true,
"evalScore": 123,
"evalExplanation": "<string>",
"evalBulletSummary": [
"<string>"
],
"criticalIssue": {
"explanation": "<string>"
},
"acceptanceCriteriaResults": [
{
"criterion": "<string>",
"met": true,
"explanation": "<string>"
}
]
}
],
"totalCount": 123
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Agents
List agent runs/chats
Retrieve a paginated list of runs/chats associated with a specific agent.
GET
/
api
/
agents
/
{agentId}
/
chats
cURL
curl -X GET "https://app.cotool.ai/api/agents/:agentId/chats" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/agents/{agentId}/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.cotool.ai/api/agents/{agentId}/chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://app.cotool.ai/api/agents/{agentId}/chats")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/agents/{agentId}/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))
}{
"chats": [
{
"id": "<string>",
"organizationId": "<string>",
"title": "<string>",
"createdAt": "2025-06-17T12:34:56.789Z",
"updatedAt": "2025-06-17T12:34:56.789Z",
"modelAlias": "<unknown>",
"userId": "<string>",
"agentId": "<string>",
"detectionId": "<string>",
"parentChatId": "<string>",
"triggerId": "<string>",
"triggerName": "<string>",
"triggerSource": "<string>",
"triggerDescription": "<string>",
"statusMessage": "<string>",
"result": "<string>",
"structuredOutputSchema": {
"title": "<string>",
"description": "<string>",
"properties": {},
"items": "<unknown>",
"required": [
"<string>"
],
"enum": [
"<string>"
],
"additionalProperties": true,
"x-cotool": {
"viewerId": "<string>"
}
},
"shareToken": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isPinned": true,
"evalScore": 123,
"evalExplanation": "<string>",
"evalBulletSummary": [
"<string>"
],
"criticalIssue": {
"explanation": "<string>"
},
"acceptanceCriteriaResults": [
{
"criterion": "<string>",
"met": true,
"explanation": "<string>"
}
]
}
],
"totalCount": 123
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Authorizations
API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here
Path Parameters
Unique identifier of the agent to list chats for
Query Parameters
Maximum number of chats to return (1-100, default: 10)
Required range:
1 <= x <= 100Number of chats to skip for pagination (default: 0)
Required range:
x >= 0Was this page helpful?
⌘I