Dashboard API
Sessions
List and inspect AI sessions for your tenant, including per-message details.
GET /dashboard/sessions
Returns a paginated list of AI sessions for your tenant, ordered by most recent activity.
GET https://api.liyaengine.ai/dashboard/sessions?domain=hiring&limit=20&offset=0
Authorization: Bearer <jwt>Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
domain | string | — | Filter by domain (e.g. hiring) |
limit | integer | 20 | Results per page — max 100 |
offset | integer | 0 | Pagination offset |
Response:
{
"success": true,
"data": {
"sessions": [
{
"sessionId": "sess_01HZ...",
"userId": "usr_123",
"domain": "hiring",
"status": "active",
"messageCount": 6,
"tokensUsed": 4800,
"costUsd": "0.002400",
"lastActivityAt": "2026-03-14T22:41:07Z",
"createdAt": "2026-03-14T20:15:00Z"
}
]
},
"pagination": {
"total": 48,
"limit": 20,
"offset": 0
}
}Session status values:
| Status | Description |
|---|---|
active | Session is open and accepting messages |
ended | Session was explicitly closed |
expired | Session expired due to inactivity |
GET /dashboard/sessions/:sessionId
Returns the full session record including all messages.
GET https://api.liyaengine.ai/dashboard/sessions/sess_01HZ...
Authorization: Bearer <jwt>Response:
{
"success": true,
"data": {
"session": {
"sessionId": "sess_01HZ...",
"userId": "usr_123",
"domain": "hiring",
"status": "active",
"messageCount": 6,
"tokensUsed": 4800,
"costUsd": "0.002400",
"lastActivityAt": "2026-03-14T22:41:07Z",
"createdAt": "2026-03-14T20:15:00Z",
"messages": [
{
"id": "msg_01...",
"role": "user",
"content": "...",
"intent": "resume_analysis",
"tokens": 820,
"costUsd": "0.000410",
"timestamp": "2026-03-14T20:15:01Z"
},
{
"id": "msg_02...",
"role": "assistant",
"content": "...",
"intent": "resume_analysis",
"tokens": 1240,
"costUsd": "0.000620",
"timestamp": "2026-03-14T20:15:04Z"
}
]
}
}
}Sessions are tenant-scoped — attempting to fetch a session belonging to another tenant returns 403 FORBIDDEN.
Message roles:
| Role | Description |
|---|---|
user | Input submitted by your end user |
assistant | Response generated by LiyaEngine |
system | Internal context messages (rarely surfaced) |
Message content may contain [REDACTED] markers if PII auto-redaction is enabled. See Data Retention for redaction configuration.