> ## Documentation Index
> Fetch the complete documentation index at: https://quintsecurity.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Sessions

> List sessions with filtering by state, platform, root_only, and since.

<Note>
  Requires `Authorization: Bearer` header with a deploy token (`qt_deploy_*`) or Supabase JWT.
</Note>

## Query Parameters

<ParamField query="state" type="string">
  Filter by session state: `active`, `idle`, `ended`.
</ParamField>

<ParamField query="platform" type="string">
  Filter by agent platform (e.g., `claude-code`, `cursor`).
</ParamField>

<ParamField query="root_only" type="boolean">
  When `true`, return only root sessions (no parent). Useful for top-level overview.
</ParamField>

<ParamField query="since" type="datetime">
  RFC 3339 timestamp (`2026-04-11T09:30:00Z`) or a bare date (`2026-04-11`,
  interpreted as midnight UTC). Only return sessions started on or after this
  time. Relative words like `yesterday` are rejected.
</ParamField>

## Response

<ResponseField name="sessions" type="array">
  Array of session records matching the filters.

  <Expandable title="session object properties">
    <ResponseField name="id" type="string">
      Session UUID.
    </ResponseField>

    <ResponseField name="session_name" type="string">
      Human-readable session name.
    </ResponseField>

    <ResponseField name="model" type="string">
      LLM model used.
    </ResponseField>

    <ResponseField name="signing_id" type="string">
      Code signing identity of the agent process.
    </ResponseField>

    <ResponseField name="state" type="string">
      Current state: `active`, `idle`, `ended`.
    </ResponseField>

    <ResponseField name="platform" type="string">
      Agent platform identifier.
    </ResponseField>

    <ResponseField name="parent_id" type="string">
      Parent session UUID, or `null` for root sessions.
    </ResponseField>

    <ResponseField name="started_at" type="datetime">
      When the session began.
    </ResponseField>

    <ResponseField name="ended_at" type="datetime">
      When the session ended. `null` if still active.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.quintai.dev/v1/sessions?state=active&root_only=true" \
    -H "Authorization: Bearer qt_deploy_YOUR_TOKEN"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.quintai.dev/v1/sessions",
      headers={"Authorization": "Bearer qt_deploy_YOUR_TOKEN"},
      params={"state": "active", "root_only": "true"},
  )
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "sessions": [
      {
        "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
        "session_name": "Fix auth middleware",
        "model": "claude-sonnet-4-20250514",
        "signing_id": "com.anthropic.claude-code",
        "state": "active",
        "platform": "claude-code",
        "parent_id": null,
        "started_at": "2026-04-12T14:00:00Z",
        "ended_at": null
      }
    ]
  }
  ```
</ResponseExample>
