v1

latestOpenAPI 3.0.02026-07-26392662.9 KB
Sessions

Overview of the sessions in a date range

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.

get/v1/workspaces/{workspaceUuid}/sessions

Path parameters

workspaceUuidstring uuid required
Example:123e4567-e89b-12d3-a456-426614174000

The UUID of the workspace

Query parameters

segmentUuidstring uuid
Example:123e4567-e89b-12d3-a456-426614174000

Only include sessions matching this segment UUID

datestring date
Example:2025-03-01

The specific date to filter sessions. Cannot be used together with date_from/date_to. Either date or date_from must be provided.

date_fromstring date
Example:2025-03-01

Start date for filtering sessions (inclusive). Required unless date is provided.

date_tostring date
Example:2025-03-10

End date for filtering sessions (inclusive). Defaults to the end of today when omitted.

urlstring
Example:checkout

Filter sessions where the visited URL contains the given string.

referrerstring
Example:google.com

Filter sessions where the referrer contains the given string.

pageinteger
Example:1

The page number for pagination.

sizeinteger
Example:10

Number of sessions per page (1-1000).

Response

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.

current_pageinteger
last_pageinteger
per_pageinteger
totalinteger
next_page_urlstring nullable
prev_page_urlstring nullable
first_page_urlstring nullable
last_page_urlstring nullable
pathstring nullable
frominteger nullable
tointeger nullable
successboolean
truncatedboolean

True when the organisation set was capped to organisation_limit.

total_organisationsinteger

Total number of organisations matching the filter, before any cap.

organisation_limitinteger

Maximum number of organisations included in a single response.

Example response

{
  "current_page": 1,
  "last_page": 10,
  "per_page": 15,
  "total": 150,
  "next_page_url": "https://api.example.com/v1/workspaces?page=2",
  "first_page_url": "https://api.example.com/v1/workspaces?page=1",
  "last_page_url": "https://api.example.com/v1/workspaces?page=10",
  "path": "https://api.example.com/v1/workspaces",
  "from": 1,
  "to": 15,
  "data": [
    {
      "uuid": "123e4567-e89b-12d3-a456-426614174000",
      "organisation_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "started_at": "2021-01-01T00:00:00Z",
      "ended_at": "2021-01-01T00:00:00Z",
      "location": {
        "country": "US",
        "state": "California",
        "city": "Los Angeles",
        "latitude": 34.0522,
        "longitude": -118.2437
      },
      "browser": "Chrome",
      "referrer": "https://google.com",
      "device_type": "mobile",
      "views": [
        {
          "visited_at": "2021-01-01T00:00:00Z",
          "url": "https://acme.com/page?foo=bar#baz"
        }
      ],
      "events": [
        {
          "event_type": "pageview",
          "url": "https://acme.com/pricing",
          "triggered_at": "2021-01-01T00:00:00Z",
          "time_on_page": 45,
          "form_id": "contact-form",
          "form_name": "Contact Form",
          "name": "plan_selected"
        }
      ]
    }
  ],
  "success": true,
  "total_organisations": 42,
  "organisation_limit": 10000
}