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

# Sessions

> List visitor sessions — each time someone viewed a room.

## Endpoints

| Method | Path | Description |
| - | - | - |
| `GET` | `/api/v2/sessions` | List sessions |

***

## List sessions

`GET /api/v2/sessions`

Returns visitor sessions across rooms in your organization,
with location, device, and contact information.

### Query parameters

<ParamField query="page" type="number">
  Page number (default: 1).
</ParamField>

<ParamField query="limit" type="number">
  Results per page (default: 10).
</ParamField>

<ParamField query="roomId" type="string">
  Filter sessions to a specific room.
</ParamField>

<ParamField query="contactId" type="string">
  Filter by identified contact ID.
</ParamField>

<ParamField query="keyword" type="string">
  Search by visitor name or email.
</ParamField>

<ParamField query="onlyContacts" type="boolean">
  When `true`, return only sessions with an identified contact.
</ParamField>

<ParamField query="sortBy" type="&#x22;createdAt&#x22; | &#x22;updatedAt&#x22;">
  Sort field (default: `createdAt`).
</ParamField>

<ParamField query="sortDirection" type="&#x22;ASC&#x22; | &#x22;DESC&#x22;">
  Sort direction (default: `DESC`).
</ParamField>

<ParamField query="from" type="string">
  Return sessions created at or after this ISO 8601 date.
</ParamField>

<ParamField query="to" type="string">
  Return sessions created at or before this ISO 8601 date.
</ParamField>

### Response fields

Each item in `results` includes:

| Field | Type | Description |
| - | - | - |
| `id` | string | Session identifier |
| `roomId` | string | Room the session belongs to |
| `createdAt` | string | ISO 8601 — when the session started |
| `updatedAt` | string | ISO 8601 |
| `city` | string \| null | Visitor city |
| `region` | string \| null | Visitor region |
| `country` | string \| null | Visitor country |
| `visitorNumber` | number \| null | Ordinal visitor number for this room |
| `browser.software` | string \| null | Browser name |
| `browser.os` | string \| null | Operating system |
| `browser.contact` | object \| null | Identified contact (`id`, `email`, `fullName`) |
| `user` | object \| null | Room owner (`id`, `email`, `firstName`, `lastName`) |

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.flowla.com/api/v2/sessions?roomId=<room_id>&limit=20" \
    -H "x-flowla-api-key: YOUR_API_KEY"
  ```

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

  response = requests.get(
      "https://api.flowla.com/api/v2/sessions",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
      params={"roomId": "<room_id>", "page": 1, "limit": 20},
  )
  print(response.json())
  ```

  ```js JavaScript theme={null}
  const res = await fetch(
    "https://api.flowla.com/api/v2/sessions?roomId=<room_id>&limit=20",
    { headers: { "x-flowla-api-key": "YOUR_API_KEY" } }
  );
  const data = await res.json();
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.