The dashboard's chat panel and any integration that wants to remember a conversation across page loads uses chat sessions — server-stored arrays of turns associated with the caller's org.
GET /api/chat/sessions
curl "https://www.mnueron.com/api/chat/sessions?limit=50" \
-H "Authorization: Bearer $MNUERON_API_TOKEN"
{
"sessions": [
{
"id": "01HQ…",
"title": "Deploy debugging",
"message_count": 12,
"last_message_preview": "And what about the rollback?",
"created_at": 1737070000000,
"updated_at": 1737071000000
}
]
}
POST /api/chat/sessions
curl -X POST https://www.mnueron.com/api/chat/sessions \
-H "Authorization: Bearer $MNUERON_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "title": "Deploy debugging" }'
201 returns the new session row. title defaults to "New chat" if omitted (≤200 chars).
GET /api/chat/sessions/:id
Returns the session with the full messages array, metadata, and timestamps.
PATCH /api/chat/sessions/:id
curl -X PATCH https://www.mnueron.com/api/chat/sessions/01HQ… \
-H "Authorization: Bearer $MNUERON_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "title": "Production deploy debugging" }'
Returns { id, title }.
DELETE /api/chat/sessions/:id
Returns { deleted: true } (or 404).