curl --request GET \
--url https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"current_page": 1,
"last_page": 10,
"per_page": 15,
"total": 150,
"next_page_url": "https://api.example.com/v1/workspaces?page=2",
"prev_page_url": null,
"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",
"time_on_page": 0,
"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",
"fields": [
{
"name": "<string>",
"value": "<string>"
}
],
"name": "plan_selected",
"properties": [
{
"name": "<string>",
"value": "<string>"
}
]
}
]
}
],
"success": true,
"truncated": false,
"total_organisations": 42,
"organisation_limit": 10000
}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.
curl --request GET \
--url https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snitcher.com/v1/workspaces/{workspaceUuid}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"current_page": 1,
"last_page": 10,
"per_page": 15,
"total": 150,
"next_page_url": "https://api.example.com/v1/workspaces?page=2",
"prev_page_url": null,
"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",
"time_on_page": 0,
"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",
"fields": [
{
"name": "<string>",
"value": "<string>"
}
],
"name": "plan_selected",
"properties": [
{
"name": "<string>",
"value": "<string>"
}
]
}
]
}
],
"success": true,
"truncated": false,
"total_organisations": 42,
"organisation_limit": 10000
}Authorizations
Enter your personal access token (PAT) to authenticate
Path Parameters
The UUID of the workspace
"123e4567-e89b-12d3-a456-426614174000"
Query Parameters
Only include sessions matching this segment UUID
"123e4567-e89b-12d3-a456-426614174000"
The specific date to filter sessions. Cannot be used together with date_from/date_to. Either date or date_from must be provided.
"2025-03-01"
Start date for filtering sessions (inclusive). Required unless date is provided.
"2025-03-01"
End date for filtering sessions (inclusive). Defaults to the end of today when omitted.
"2025-03-10"
Filter sessions where the visited URL contains the given string.
"checkout"
Filter sessions where the referrer contains the given string.
"google.com"
The page number for pagination.
1
Number of sessions per page (1-1000).
1 <= x <= 100010
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.
1
10
15
150
"https://api.example.com/v1/workspaces?page=2"
null
"https://api.example.com/v1/workspaces?page=1"
"https://api.example.com/v1/workspaces?page=10"
"https://api.example.com/v1/workspaces"
1
15
Show child attributes
Show child attributes
true
True when the organisation set was capped to organisation_limit.
false
Total number of organisations matching the filter, before any cap.
42
Maximum number of organisations included in a single response.
10000