This endpoint lists the sessions the tracking script saw on your website, the same rows as the Sessions list in Visitor insights: how each visit went, how much friction it met, and which contact it belongs to when the visitor is known. Use it to feed your own reports or to look up a contact's recent visits. It never returns a recording, page text or a person's name. How the sessions are collected is in Tracking script, and the shared rules for keys and limits are in REST API.
Before you start
- The plan must include API access and Visitor insights: friction and errors.
- Any key works, including a Read only key, and the key's creator can have any role.
- If the key's creator has a custom role that blocks Visitor insights: friction and errors, the endpoint answers
403. - Sessions exist only for sites where Notice friction on this site is on. See Tracking script.
List sessions
GET /visitor-sessions
| Parameter | Rules |
|---|---|
days |
Optional. 7, 30, 90 or 365. Defaults to 30. Returns the sessions that started in that many days before now |
outcome |
Optional. ordered, checkout_left, cart_left, browsed or bounced. See Outcomes |
contact |
Optional. A contact's UUID. Returns only the sessions of visitors linked to that contact. An unknown ID returns an empty list |
page |
Optional. A whole number from 1 to 99999. Defaults to 1 |
Sessions are listed newest first, 25 to a page. Any other parameter is ignored.
curl "https://rutbacrm.com/api/v1/visitor-sessions?days=7&outcome=checkout_left" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
The response is 200:
{
"data": [
{
"id": "6c1f0b6e-2d4a-4f7e-9a3b-8e5d1c2b4a90",
"started_at": "2026-11-11T18:42:10+00:00",
"contact_id": "CONTACT_ID",
"device": "mobile",
"source": "google",
"campaign": "ramadan-sale",
"pages": 6,
"seconds": 184,
"outcome": "checkout_left",
"order": null,
"friction": 7,
"signals": {
"rage": 1,
"dead": 0,
"quick_back": 0,
"excessive_scroll": 0,
"js_error": 0,
"error_click": 1
},
"recorded": true
}
],
"page": 1,
"pages": 1,
"total": 1
}
Session fields
| Field | Type | Meaning |
|---|---|---|
id |
string | The session's UUID |
started_at |
string | When the session's first page opened, in ISO 8601 with its offset, in UTC |
contact_id |
string or null | The contact the visitor is linked to, through a form, an order or a purchase event. null when the visitor is unknown or the contact was erased |
device |
string | desktop, tablet or mobile |
source |
string or null | The utm_source of the session's first page, or else the source the visitor first came with. null when neither has one |
campaign |
string or null | The utm_campaign, found the same way |
pages |
integer | Pages opened in the session |
seconds |
integer | Active time across the session's pages, counted only while the tab was visible |
outcome |
string | How the session ended. See Outcomes |
order |
string or null | The order number seen on the thank-you page or sent in a purchase event, when the session ordered |
friction |
integer | A score from 0 to 100. Each signal adds its weight: error_click 4, rage 3, js_error 3, quick_back 2, dead 1, excessive_scroll 1. 0 means no friction was noticed |
signals |
object | How many times each signal happened in the session |
recorded |
boolean | true while a recording of the session is kept. Watch it in Visitor insights: the API never returns it |
The signals are:
| Signal | Meaning |
|---|---|
rage |
Three clicks within a second in one spot |
dead |
A click on something that looks clickable, after which nothing changed for a second |
quick_back |
A page left within 7 seconds, then gone back from |
excessive_scroll |
Four changes of scrolling direction within 20 seconds |
js_error |
A JavaScript error on the page |
error_click |
A JavaScript error less than a second after a click |
Pagination
| Field | Meaning |
|---|---|
page |
The page returned |
pages |
The number of the last page. 1 when there are no sessions |
total |
Sessions that match, across all pages |
Do not confuse the top-level pages, the number of result pages, with each session's pages, the pages it opened. Ask for the next page until it equals pages. A page past the last one returns an empty data list.
Outcomes
Each session gets the first outcome that applies:
outcome |
Shown as | When |
|---|---|---|
ordered |
Ordered | An order was seen in the session |
checkout_left |
Left at checkout | It reached a checkout page and did not order |
cart_left |
Left a full cart | It reached a cart page and not the checkout |
bounced |
Left at once | One page, and less than 10 seconds of active time |
browsed |
Browsed | Anything else |
The outcome filter follows the same rules with two differences: browsed also returns sessions whose outcome is bounced, and bounced returns every one-page session under 10 seconds, whatever else happened in it. To get exactly one outcome, filter and then check each session's outcome.
Errors
| Status | Message | Cause |
|---|---|---|
401 |
Invalid API key. |
The key is wrong or revoked |
403 |
API access is not in this plan. |
The plan does not include API access, or a custom role blocks it for the key's creator |
403 |
Visitor insights are not in this plan. |
The plan does not include Visitor insights: friction and errors |
403 |
Visitor insights are not allowed for this role. |
A custom role blocks Visitor insights: friction and errors for the key's creator |
422 |
Empty | days is not one of the four values, page is not a whole number from 1 to 99999, outcome is not one of the five values, or contact is not a UUID. There is no errors object |
Other limits and status codes are the same as for the whole API; see Errors and limits.
Good to know
- Sessions are kept for a year and a month, so
days=365always reaches back a full year. - A session is one browser tab, until 30 minutes pass without a new page. The same person on two devices is two visitors.
- The list counts only visitors the tracking script sees: when consent is required, those who accepted it.
- Pages, clicks, recordings and AI summaries are not part of the API. Open them in Visitor insights, described in Visitor insights.
Last updated 2026-11-12