Liya Engine

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:

ParameterTypeDefaultDescription
domainstringFilter by domain (e.g. hiring)
limitinteger20Results per page — max 100
offsetinteger0Pagination 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:

StatusDescription
activeSession is open and accepting messages
endedSession was explicitly closed
expiredSession 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:

RoleDescription
userInput submitted by your end user
assistantResponse generated by Liya Engine
systemInternal context messages (rarely surfaced)

Message content may contain [REDACTED] markers if PII auto-redaction is enabled. See Data Retention for redaction configuration.

On this page