Leni HTTP API
Chat messages
Read persisted chat.message rows owned by the project-key user. These routes cannot enumerate another user’s messages.
GET/users/me/chat-messages
| Query | Default | Allowed |
|---|---|---|
| limit | 100 | Integer 1–500 |
| offset | 0 | Integer 0–1,000,000 |
{
"messages": [
{ "id": "<uuid>", "sessionId": "<uuid>", "role": "user", "status": "completed", "content": "...", "createdAt": "..." }
]
}GET/users/me/chat-messages/:messageId
messageId must be a UUID owned by the authenticated key user. Returns { "message": { ... } }, including the current processing, completed, or failed status. A 404 means the row is absent or inaccessible; it is not evidence that a different session or run identifier should be substituted.
curl -sS "https://api.prod.ca-central-1.leni.co/users/me/chat-messages/<message-uuid>" \
-H "X-Api-Key: $LENI_API_KEY"