---
title: "Overview of the sessions in a date range"
method: GET
path: "/v1/workspaces/{workspaceUuid}/sessions"
tags: ["Sessions"]
---

# Overview of the sessions in a date range

`GET /v1/workspaces/{workspaceUuid}/sessions`

Lists sessions within a date range. A date range is required: provide either `date` or `date_from` (optionally with `date_to`), otherwise the request fails with a 400.

## Path parameters

- `workspaceUuid` string, uuid, required

## Query parameters

- `segmentUuid` string, uuid
- `date` string, date
- `date_from` string, date
- `date_to` string, date
- `url` string
- `referrer` string
- `page` integer
- `size` integer

## Response `200`

List of sessions. When more than `organisation_limit` organisations match the date range, the response is truncated to the most-recently-active organisations and `truncated` is set to true. The caller can use the per-organisation sessions endpoint to backfill any orgs beyond the cap.

- object
  - `current_page` integer
  - `last_page` integer
  - `per_page` integer
  - `total` integer
  - `next_page_url` string, nullable
  - `prev_page_url` string, nullable
  - `first_page_url` string, nullable
  - `last_page_url` string, nullable
  - `path` string, nullable
  - `from` integer, nullable
  - `to` integer, nullable
  - `data` Session[]
    - `uuid` string, uuid
    - `organisation_uuid` string, uuid
    - `started_at` string, date-time
    - `ended_at` string, date-time
    - `location` Location — Representation of an location in API responses
      - `country` string — Maps an Organisation object to an API response.
      - `state` string
      - `city` string
      - `latitude` number
      - `longitude` number
    - `browser` string, nullable — The browser used during the session
    - `referrer` string, nullable — The referring URL from which the session originated
    - `device_type` string, nullable — The type of device used (e.g., desktop, mobile, tablet)
    - `views` object[] — Deprecated: Use `events` instead. Only contains pageview events.
      - `visited_at` string, date-time
      - `time_on_page` integer
      - `url` string
    - `events` SessionEvent[] — All tracking events in the session (pageviews, form submissions, custom events, clicks, downloads)
      - `event_type` 'pageview' | 'form_submit' | 'track' | 'click' | 'download' — The type of event
      - `url` string — The URL where the event occurred
      - `triggered_at` string, date-time — When the event was triggered
      - `time_on_page` integer, nullable — Time spent on page in seconds (pageview only)
      - `form_id` string, nullable — The form element ID (form_submit only)
      - `form_name` string, nullable — The form name (form_submit only)
      - `fields` object[], nullable — Form fields submitted (form_submit only)
        - `name` string
        - `value` string
      - `name` string, nullable — Event name (track, click, download only)
      - `properties` object[], nullable — Event properties (track, click, download only)
        - `name` string
        - `value` string
  - `success` boolean
  - `truncated` boolean — True when the organisation set was capped to `organisation_limit`.
  - `total_organisations` integer — Total number of organisations matching the filter, before any cap.
  - `organisation_limit` integer — Maximum number of organisations included in a single response.

## Other responses

- `400` — Invalid parameters, e.g. no date range provided

---

[API](https://skmtc.dev/snitcher/apis/snitcher-api.md) · [All operations](https://skmtc.dev/snitcher/apis/snitcher-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/snitcher/snitcher-api/revisions/cb6fa68e7c8e/schema)
