Skip to main content
GET
/
api
/
chat-messages
/
chat
/
id
/
{chatId}
/
count
Get message count for a chat via API key
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>"
}

Authorizations

Authorization
string
header
required

Enter your LeanMCP API key

Path Parameters

chatId
string
required

Chat ID

Example:

"c1a83d84-7154-464c-bd19-a9f10e0a067f"

Response

200 - application/json

Message count retrieved successfully

chatId
string
messageCount
number
countedAt
string