cURL
curl --request GET \ --url https://api.leanmcp.com/api/chats/id/{id}/history/raw \ --header 'Authorization: Bearer <token>'
{ "chat": { "id": "<string>", "userId": "<string>", "title": "<string>", "isPublic": false, "status": "active", "createdAt": "<string>", "updatedAt": "<string>", "messageCount": 1, "showcased": false, "summary": "<string>", "modelUsed": "<string>", "systemMessageId": "<string>", "metadata": {} }, "messageIds": [ "<string>" ], "totalMessages": 123, "retrievedAt": "<string>" }
Returns just the messages for a chat without full metadata using API key authentication. Requires CHAT scope.
Enter your LeanMCP API key
Chat ID
"c1a83d84-7154-464c-bd19-a9f10e0a067f"
Chat history retrieved successfully
Chat metadata
Show child attributes
Array of message IDs in chronological order
Total number of messages in chat
Timestamp when history was retrieved