curl -X GET "https://app.cotool.ai/api/chat/history" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/chat/history"
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/chat/history', 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/chat/history")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/chat/history"
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))
}{
"events": [
{
"id": "<string>",
"type": "chat",
"timestamp": 123,
"chatId": "<string>",
"sender": "user",
"messageType": "text",
"modelAlias": "<unknown>",
"content": "<string>",
"attachments": [
{
"fileId": "<string>",
"fileName": "<string>",
"size": 123,
"objectPath": "<string>",
"fileType": "image",
"previewText": "<string>"
}
],
"agentInputVersion": 123,
"agentInputSourceType": "<string>",
"agentInputSchemaType": "<string>",
"agentInputHeadline": "<string>",
"agentInputContext": "<string>",
"agentInputSeverity": "<string>",
"agentInputLinkLabel": "<string>",
"agentInputLinkUrl": "<string>",
"agentInputPayload": "<string>",
"toolCalls": [
{
"type": "tool-call",
"toolCallId": "<string>",
"toolName": "<string>",
"input": "<unknown>"
}
]
}
],
"chat": {
"id": "<string>",
"organizationId": "<string>",
"title": "<string>",
"createdAt": "2025-06-17T12:34:56.789Z",
"updatedAt": "2025-06-17T12:34:56.789Z",
"experience": "chat",
"modelAlias": "<unknown>",
"status": "queued",
"userId": "<string>",
"agentId": "<string>",
"detectionId": "<string>",
"parentChatId": "<string>",
"detectionPlatform": "panther",
"command": "create-agent",
"codeDetectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"codeDetectionSessionMode": "editor",
"contentFilterFallbackModelAlias": "<string>",
"triggerId": "<string>",
"triggerName": "<string>",
"triggerSource": "<string>",
"triggerDescription": "<string>",
"linearOrganizationId": "<string>",
"linearIssueId": "<string>",
"linearAgentSessionId": "<string>",
"statusMessage": "<string>",
"result": "<string>",
"structuredOutputSchema": {
"type": "string",
"title": "<string>",
"description": "<string>",
"properties": {},
"items": "<unknown>",
"minItems": 1,
"maxItems": 1,
"required": [
"<string>"
],
"enum": [
"<string>"
],
"additionalProperties": true,
"x-cotool": {
"presetId": "classification",
"viewerId": "<string>"
}
},
"shareToken": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isPinned": true,
"evalScore": 123,
"evalExplanation": "<string>",
"evalBulletSummary": [
"<string>"
],
"criticalIssue": {
"category": "authentication",
"explanation": "<string>"
},
"acceptanceCriteriaResults": [
{
"criterion": "<string>",
"met": true,
"explanation": "<string>"
}
]
},
"feedbackByEvent": {},
"nextCursor": "<string>",
"hasMore": true
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Get chat history
Retrieve all events and chat metadata for the specified chat conversation. If the chat has a structured output schema, the generated structured output is returned in chat.result.
curl -X GET "https://app.cotool.ai/api/chat/history" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/chat/history"
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/chat/history', 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/chat/history")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/chat/history"
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))
}{
"events": [
{
"id": "<string>",
"type": "chat",
"timestamp": 123,
"chatId": "<string>",
"sender": "user",
"messageType": "text",
"modelAlias": "<unknown>",
"content": "<string>",
"attachments": [
{
"fileId": "<string>",
"fileName": "<string>",
"size": 123,
"objectPath": "<string>",
"fileType": "image",
"previewText": "<string>"
}
],
"agentInputVersion": 123,
"agentInputSourceType": "<string>",
"agentInputSchemaType": "<string>",
"agentInputHeadline": "<string>",
"agentInputContext": "<string>",
"agentInputSeverity": "<string>",
"agentInputLinkLabel": "<string>",
"agentInputLinkUrl": "<string>",
"agentInputPayload": "<string>",
"toolCalls": [
{
"type": "tool-call",
"toolCallId": "<string>",
"toolName": "<string>",
"input": "<unknown>"
}
]
}
],
"chat": {
"id": "<string>",
"organizationId": "<string>",
"title": "<string>",
"createdAt": "2025-06-17T12:34:56.789Z",
"updatedAt": "2025-06-17T12:34:56.789Z",
"experience": "chat",
"modelAlias": "<unknown>",
"status": "queued",
"userId": "<string>",
"agentId": "<string>",
"detectionId": "<string>",
"parentChatId": "<string>",
"detectionPlatform": "panther",
"command": "create-agent",
"codeDetectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"codeDetectionSessionMode": "editor",
"contentFilterFallbackModelAlias": "<string>",
"triggerId": "<string>",
"triggerName": "<string>",
"triggerSource": "<string>",
"triggerDescription": "<string>",
"linearOrganizationId": "<string>",
"linearIssueId": "<string>",
"linearAgentSessionId": "<string>",
"statusMessage": "<string>",
"result": "<string>",
"structuredOutputSchema": {
"type": "string",
"title": "<string>",
"description": "<string>",
"properties": {},
"items": "<unknown>",
"minItems": 1,
"maxItems": 1,
"required": [
"<string>"
],
"enum": [
"<string>"
],
"additionalProperties": true,
"x-cotool": {
"presetId": "classification",
"viewerId": "<string>"
}
},
"shareToken": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isPinned": true,
"evalScore": 123,
"evalExplanation": "<string>",
"evalBulletSummary": [
"<string>"
],
"criticalIssue": {
"category": "authentication",
"explanation": "<string>"
},
"acceptanceCriteriaResults": [
{
"criterion": "<string>",
"met": true,
"explanation": "<string>"
}
]
},
"feedbackByEvent": {},
"nextCursor": "<string>",
"hasMore": true
}{
"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
Query Parameters
Unique identifier of the chat to retrieve history for
Optional page size for paginated history fetch (1-100)
1 <= x <= 100Cursor for loading older events
^\d+:[0-9a-fA-F-]{36}$Response
Successful response
Chat history response containing events and chat metadata
Array of chat event objects
A chat event that can be one of many types: chat messages, tool usage, status updates, artifacts, etc. Each event has a discriminator field "type" that determines its structure.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
Show child attributes
Show child attributes
Chat details or null if not found
Show child attributes
Show child attributes
Latest human thumb feedback keyed by chat event id
Show child attributes
Show child attributes
Cursor for loading older events
^\d+:[0-9a-fA-F-]{36}$Whether more older events are available
Was this page helpful?