cURL
curl --request GET \ --url https://api.leanmcp.com/api/chat-messages/chat/id/{chatId}/count \ --header 'Authorization: Bearer <token>'
{ "chatId": "<string>", "messageCount": 123, "countedAt": "<string>" }
Returns the total number of messages in a chat using API key authentication. Requires CHAT scope.
Enter your LeanMCP API key
Chat ID
"c1a83d84-7154-464c-bd19-a9f10e0a067f"
Message count retrieved successfully