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>"
        }
      ],
      "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>",
    "userId": "<string>",
    "agentId": "<string>",
    "detectionId": "<string>",
    "detectionPlatform": "panther",
    "triggerId": "<string>",
    "triggerName": "<string>",
    "triggerSource": "<string>",
    "triggerDescription": "<string>",
    "isStreaming": true,
    "result": "<string>",
    "structuredOutputSchema": {
      "type": "string",
      "title": "<string>",
      "description": "<string>",
      "properties": {},
      "items": "<unknown>",
      "required": [
        "<string>"
      ],
      "enum": [
        "<string>"
      ],
      "x-cotool": {
        "presetId": "classification"
      }
    },
    "error": "<string>",
    "evalScore": 123,
    "evalExplanation": "<string>",
    "evalBulletSummary": [
      "<string>"
    ]
  },
  "feedbackByEvent": {}
}

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

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