curl --request GET \
--url http://co-mind-platform-host/v1/chat/sessions/{id}/messages \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"id": "msg_001",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "user",
"content": "What are the main features of your product?",
"created_at": 1699564800
},
{
"id": "msg_002",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "assistant",
"content": "Our product has three main features - advanced analytics, real-time collaboration, and automated workflows.",
"created_at": 1699564801,
"knowledge_base_context": {
"sources": [
{
"knowledgebase_id": "kb_abc123",
"document_id": "doc_123",
"title": "Product Overview",
"relevance_score": 0.95,
"page": 2
}
]
}
},
{
"id": "msg_003",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "user",
"content": "Can you tell me more about the analytics feature?",
"created_at": 1699564820
},
{
"id": "msg_004",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "assistant",
"content": "The analytics feature provides real-time dashboards, custom reports, and predictive insights using machine learning algorithms.",
"created_at": 1699564821,
"knowledge_base_context": {
"sources": [
{
"knowledgebase_id": "kb_abc123",
"document_id": "doc_456",
"title": "Analytics Documentation",
"relevance_score": 0.92,
"page": 5
}
]
}
},
{
"id": "msg_005",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "user",
"content": "What machine learning algorithms do you support?",
"created_at": 1699564840
},
{
"id": "msg_006",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "assistant",
"content": "We support several ML algorithms including linear regression, decision trees, random forests, gradient boosting, and neural networks for deep learning tasks.",
"created_at": 1699564841
}
],
"has_more": false
}Get conversation history for a chat session. Returns all messages in chronological order.
Example use case: A customer support session where the user asks multiple questions about a product.
curl --request GET \
--url http://co-mind-platform-host/v1/chat/sessions/{id}/messages \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"id": "msg_001",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "user",
"content": "What are the main features of your product?",
"created_at": 1699564800
},
{
"id": "msg_002",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "assistant",
"content": "Our product has three main features - advanced analytics, real-time collaboration, and automated workflows.",
"created_at": 1699564801,
"knowledge_base_context": {
"sources": [
{
"knowledgebase_id": "kb_abc123",
"document_id": "doc_123",
"title": "Product Overview",
"relevance_score": 0.95,
"page": 2
}
]
}
},
{
"id": "msg_003",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "user",
"content": "Can you tell me more about the analytics feature?",
"created_at": 1699564820
},
{
"id": "msg_004",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "assistant",
"content": "The analytics feature provides real-time dashboards, custom reports, and predictive insights using machine learning algorithms.",
"created_at": 1699564821,
"knowledge_base_context": {
"sources": [
{
"knowledgebase_id": "kb_abc123",
"document_id": "doc_456",
"title": "Analytics Documentation",
"relevance_score": 0.92,
"page": 5
}
]
}
},
{
"id": "msg_005",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "user",
"content": "What machine learning algorithms do you support?",
"created_at": 1699564840
},
{
"id": "msg_006",
"object": "chat.message",
"session_id": "session_xyz789",
"role": "assistant",
"content": "We support several ML algorithms including linear regression, decision trees, random forests, gradient boosting, and neural networks for deep learning tasks.",
"created_at": 1699564841
}
],
"has_more": false
}Bearer token authentication. Supports two token types:
POST /v1/auth/loginPOST /v1/api-tokens, format: cmnd_<tokenId>.<secret>The session ID
Maximum number of messages to return
Message ID to paginate before
Message ID to paginate after