Docs·Sessions
GET
/api/v1/event/analytics/web-analytics/sessions/:sessionIdGet a session
One session in full, whatever its date: everything a row of /sessions has, plus when it ended, whether the visitor was new, the entry page's title, the referring address, the UTM tags, and the browser and system versions. A session id that does not exist in this audience returns a 404.
Keys: an account key. Getting started explains both kinds.
Parameters
| Prop | In | Type | Notes |
|---|---|---|---|
sessionId | path | string | The session id, as id on a session row or sessionId on an event. |
contactListId | query | string | The id of the audience (the tracked site) to read, a UUID: anything else returns a 400. You must be a member of the workspace the audience belongs to, or the call returns a 401. An id that matches no audience is not an error: the call returns no data. |
Response
| Prop | Type | Notes |
|---|---|---|
id | string | The session id. |
visitorId | string | The visitor (browser) the session belongs to. |
visitorDisplay | string | The visitor's email when identified, else the visitor id. |
contactId | string | The person id when the visitor is identified. Left out for anonymous visitors. |
startedAt | string | When the session started, in UTC with milliseconds, such as 2026-09-30 14:03:12.345+00. |
duration | number | Length in milliseconds as last reported, 0 until the session first ends. |
pageCount | number | Page views in the session. |
entryPath | string | Path of the first page. |
entryHostname | string | Hostname of the first page. |
isBounce | boolean | true when the session had one page and no interactions (your own events or link clicks; the automatic scroll event does not count). It is set when the session ends, so it reads false until then. |
exitPath | string | Path of the last page viewed so far. |
exitHostname | string | Hostname of that last page. |
eventCount | number | Everything recorded in the session: page views, your own events, scroll and link-click events. |
channel | string | Channel the visit came through, such as Organic Search or Direct. |
referrerSource | string | Source of the visit, such as Google, '' when none. |
country | string | Two-letter country code, '' when unknown. |
region | string | Region, '' when unknown. |
city | string | City, '' when unknown. |
browser | string | Browser, such as Chrome. |
os | string | Operating system, such as Windows. |
device | string | Desktop, Mobile or Tablet. |
endedAt | string | When the session last ended, in the same form as startedAt; null while it is open. |
isNewVisitor | boolean | true when the tracking script reported a first-time visitor at the start of the session. |
entryTitle | string | Title of the first page. |
referrer | string | The referring address, usually host and path such as news.ycombinator.com/item, '' when none. |
utmSource | string | UTM source of the page the visit landed on, '' when none. |
utmMedium | string | UTM medium of that page, '' when none. |
utmCampaign | string | UTM campaign of that page, '' when none. |
browserVersion | string | Browser version, major and minor, such as 120.0. |
osVersion | string | Operating system version, major and minor, such as 10.0. |
Request
curl 'https://app.spreelytics.com/api/v1/event/analytics/web-analytics/sessions/:sessionId?contactListId=…' \
-H 'Authorization: Bearer YOUR_API_KEY'
const url = new URL('https://app.spreelytics.com/api/v1/event/analytics/web-analytics/sessions/:sessionId');
url.searchParams.set('contactListId', '…');
const res = await fetch(url, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
const data = await res.json();
import requests
res = requests.get(
"https://app.spreelytics.com/api/v1/event/analytics/web-analytics/sessions/:sessionId",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={"contactListId": "…"},
)
data = res.json()
Response
{
"id": "string",
"visitorId": "string",
"visitorDisplay": "string",
"contactId": "string",
"startedAt": "string",
"duration": 0,
"pageCount": 0,
"entryPath": "string",
"entryHostname": "string",
"isBounce": true,
"exitPath": "string",
"exitHostname": "string",
"eventCount": 0,
"channel": "string",
"referrerSource": "string",
"country": "string",
"region": "string",
"city": "string",
"browser": "string",
"os": "string",
"device": "string",
"endedAt": "string",
"isNewVisitor": true,
"entryTitle": "string",
"referrer": "string",
"utmSource": "string",
"utmMedium": "string",
"utmCampaign": "string",
"browserVersion": "string",
"osVersion": "string"
}