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

# List Sessions

> Sessions of a project in a time window, with duration, disconnect code, crash flag and viewer client.

Return the project's sessions in a window, newest first, with everything needed to spot trouble without opening each one: status, region, start and end, duration, the disconnect code it ended with, whether a crash was detected in its Unreal log, and the viewer's browser, OS, device and country.

<Info>
  Scope: `read`. Default window: the last 7 days. Page size is capped at 100; the `summary` covers the whole window regardless of paging.
</Info>

## Path parameters

<ParamField path="projectId" type="string" required>
  The project.
</ParamField>

## Query parameters

<ParamField query="startDate" type="string">
  ISO 8601 start of the window. Default: 7 days ago.
</ParamField>

<ParamField query="endDate" type="string">
  ISO 8601 end of the window. Default: now.
</ParamField>

<ParamField query="status" type="string" default="all">
  `all`, `live`, `terminated` or `queued`.
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Page size, at most 100.
</ParamField>

<ParamField query="skip" type="integer" default="0">
  Offset for paging.
</ParamField>

<ParamField query="sortBy" type="string" default="startTime">
  `startTime`, `endTime` or `durationMinutes`.
</ParamField>

<ParamField query="sortOrder" type="string" default="desc">
  `asc` or `desc`.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your Streampixel API key.
</ParamField>

## Response

<ResponseField name="data.sessions" type="array">
  <Expandable title="Session fields">
    <ResponseField name="sessionId" type="string">Session id, e.g. `session_1790294409382_3035`. Use it with [Session Detail](/resources/api-reference/session-detail), [Session Telemetry](/resources/api-reference/session-telemetry) and [Session Logs](/resources/api-reference/session-logs).</ResponseField>
    <ResponseField name="streamingId" type="string | null">The streamer instance id.</ResponseField>
    <ResponseField name="status" type="string">Last recorded status: `Enqueued`, `Starting`, `Running`, `Terminating`, `Terminated`.</ResponseField>
    <ResponseField name="statusInferred" type="boolean">`true` when the record never received a final status and is reported as ended at the runtime cap. Its duration is an upper bound.</ResponseField>
    <ResponseField name="region" type="string">Region the session ran in.</ResponseField>
    <ResponseField name="startTime" type="string">ISO 8601.</ResponseField>
    <ResponseField name="endTime" type="string | null">ISO 8601, `null` while live.</ResponseField>
    <ResponseField name="durationMinutes" type="number | null">Minutes between start and end.</ResponseField>
    <ResponseField name="disconnectCode" type="number | null">The close code the session ended with. See [Disconnect codes](/resources/quick-start-guide/disconnect-codes).</ResponseField>
    <ResponseField name="crashType" type="string | null">`GPU`, `LowLevelFatal` or `General` when the Unreal log matched a crash pattern. `General` is usually a clean engine exit, not a crash.</ResponseField>
    <ResponseField name="clientInfo" type="object | null">`os`, `browser`, `device`, `country`, `city` when reported by the player.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="data.pagination" type="object">
  `total`, `skip`, `limit`, `hasMore`.
</ResponseField>

<ResponseField name="data.summary" type="object">
  For the whole window: `totalSessions`, `liveSessions`, `terminatedSessions`, `sessionsWithIssues`, `sessionsWithCrashes`.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"dark"}
  curl "https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/sessions?startDate=2026-09-25T00:00:00Z&endDate=2026-09-26T00:00:00Z&limit=100" \
    -H "x-api-key: $STREAMPIXEL_API_KEY"
  ```

  ```javascript Node.js theme={"dark"}
  // Walk every page of yesterday's sessions.
  const base = 'https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/sessions';
  const all = [];
  for (let skip = 0; ; skip += 100) {
    const u = new URL(base);
    u.search = new URLSearchParams({ startDate: '2026-09-25T00:00:00Z', endDate: '2026-09-26T00:00:00Z', limit: '100', skip: String(skip) });
    const { data } = await (await fetch(u, { headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } })).json();
    all.push(...data.sessions);
    if (!data.pagination.hasMore) break;
  }
  const failed = all.filter((s) => s.crashType && s.crashType !== 'General' || [4002, 4003, 4005, 4006].includes(s.disconnectCode));
  ```

  ```python Python theme={"dark"}
  import os, requests

  r = requests.get(
      "https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/sessions",
      params={"startDate": "2026-09-25T00:00:00Z", "endDate": "2026-09-26T00:00:00Z", "limit": 100},
      headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
  )
  data = r.json()["data"]
  print(data["summary"])
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"dark"}
  {
    "success": true,
    "data": {
      "sessions": [
        {
          "sessionId": "session_1790294409382_3035",
          "streamingId": "st_7f3a",
          "projectId": "664f1a2b3c4d5e6f7a8b9c0d",
          "status": "Terminated",
          "statusInferred": false,
          "region": "Europe",
          "startTime": "2026-09-25T14:02:11.000Z",
          "endTime": "2026-09-25T14:31:40.000Z",
          "durationMinutes": 29.5,
          "disconnectCode": 1000,
          "crashType": null,
          "clientInfo": { "os": "Windows", "browser": "Chrome", "device": "desktop", "country": "DE" }
        }
      ],
      "pagination": { "total": 143, "skip": 0, "limit": 100, "hasMore": true },
      "summary": { "totalSessions": 143, "liveSessions": 2, "terminatedSessions": 141, "sessionsWithIssues": 6, "sessionsWithCrashes": 1 }
    }
  }
  ```
</ResponseExample>

## Errors

| Status | Cause                                                            |
| ------ | ---------------------------------------------------------------- |
| `403`  | The key lacks `read`, or the project belongs to another account. |
| `404`  | No project with that id.                                         |
