cURL
curl --request GET \ --url https://api.leanmcp.com/api/chats/id/{id}/history/full \ --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": {} }, "messages": [ { "id": "<string>", "chatId": "c1a83d84-7154-464c-bd19-a9f10e0a067f", "userId": "<string>", "role": "system", "content": "<string>", "messageIndex": 1, "createdAt": "<string>", "updatedAt": "<string>", "fileStates": [ { "fileStateId": "<string>", "filePath": "<string>" } ], "metadata": {} } ], "totalMessages": 123, "retrievedAt": "<string>" }
Returns chat metadata along with all messages in the conversation using API key authentication. Requires CHAT scope.
Enter your LeanMCP API key
Chat ID
"c1a83d84-7154-464c-bd19-a9f10e0a067f"
Full chat history retrieved successfully
Chat metadata
Show child attributes
Array of complete message objects with associated file states in chronological order
Total number of messages in chat
Timestamp when history was retrieved