Skip to main content
GET
/
api
/
chat
/
history
cURL
curl -X GET "https://app.cotool.ai/api/chat/history" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
{
  "events": [
    {
      "id": "<string>",
      "type": "<string>",
      "timestamp": 123,
      "chatId": "<string>",
      "sender": "user",
      "messageType": "text",
      "modelAlias": "<unknown>",
      "content": "<string>",
      "attachments": [
        {
          "fileId": "<string>",
          "fileName": "<string>",
          "mimeType": "<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": "<string>",
          "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": "running",
    "userId": "<string>",
    "agentId": "<string>",
    "detectionId": "<string>",
    "parentChatId": "<string>",
    "detectionPlatform": "panther",
    "triggerId": "<string>",
    "triggerName": "<string>",
    "triggerSource": "<string>",
    "triggerDescription": "<string>",
    "statusMessage": "<string>",
    "result": "<string>",
    "structuredOutputSchema": {
      "type": "string",
      "title": "<string>",
      "description": "<string>",
      "properties": {},
      "items": "<unknown>",
      "required": [
        "<string>"
      ],
      "enum": [
        "<string>"
      ],
      "additionalProperties": true,
      "x-cotool": {
        "presetId": "classification"
      }
    },
    "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
}

Documentation Index

Fetch the complete documentation index at: https://docs.cotool.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here

Query Parameters

chatId
string<uuid>
required

Unique identifier of the chat to retrieve history for

limit
number

Optional page size for paginated history fetch (1-100)

Required range: 1 <= x <= 100
beforeCursor
string

Cursor for loading older events

Pattern: ^\d+:[0-9a-fA-F-]{36}$

Response

200 - application/json

Successful response

Chat history response containing events and chat metadata

events
object[]
required

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.

chat
object
required

Chat details or null if not found

feedbackByEvent
object
nextCursor
string | null

Cursor for loading older events

Pattern: ^\d+:[0-9a-fA-F-]{36}$
hasMore
boolean

Whether more older events are available