Skip to main content
GET
/
api
/
chats
/
recent
/
{limit}
Get recent chats via API key
curl --request GET \
  --url https://api.leanmcp.com/api/chats/recent/{limit} \
  --header 'Authorization: Bearer <token>'
[
  {
    "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": {}
  }
]

Authorizations

Authorization
string
header
required

Enter your LeanMCP API key

Path Parameters

limit
string
required

Maximum number of chats to return

Response

200 - application/json

Recent chats retrieved successfully

id
string
required

Unique chat identifier (UUID)

userId
string
required

User ID who owns this chat

title
string
required

Chat title or subject

isPublic
boolean
default:false
required

Whether this chat is publicly accessible

status
enum<string>
default:active
required

Current status of the chat

Available options:
active,
archived,
deleted
createdAt
string
required

Timestamp when chat was created

updatedAt
string
required

Timestamp when chat was last updated

messageCount
number
required

Number of messages in this chat

Required range: x >= 0
showcased
boolean
default:false

Whether this chat is showcased/featured

summary
string

Brief summary of the chat conversation

modelUsed
string

AI model used in this chat (e.g., claude-3-sonnet)

systemMessageId
string

ID of the system message for this chat

metadata
object

Additional metadata for the chat