Sessions
Operations around Sessions and Session data.
Endpoints
GET /api/websites/:websiteId/sessions
GET /api/websites/:websiteId/sessions/stats
GET /api/websites/:websiteId/sessions/weekly
GET /api/websites/:websiteId/sessions/:sessionId
GET /api/websites/:websiteId/sessions/:sessionId/activity
GET /api/websites/:websiteId/sessions/:sessionId/properties
GET /api/websites/:websiteId/session-data/properties
GET /api/websites/:websiteId/session-data/valuesFilters
All Endpoints marked with filters can now be filtered with the parameters below.
Parameters
path: (string | optional) Name of URL.referrer: (string | optional) Name of referrer.title: (string | optional) Name of page title.query: (string | optional) Name of query parameter.browser: (string | optional) Name of browser.os: (string | optional) Name of operating system.device: (string | optional) Name of device (ex. Mobile)country: (string | optional) Name of country.region: (string | optional) Name of region/state/province.city: (string | optional) Name of city.hostname: (string | optional) Name of hostname.tag: (string | optional) Name of tag.segment: (uuid | optional) UUID of segment.cohort: (uuid | optional) UUID of cohort.
GET /api/websites/:websiteId/sessions
Gets website session details within a given time range.
Parameters
startAt: (number) Timestamp (in ms) of starting date.endAt: (number) Timestamp (in ms) of end date.search: (string | optional) Search text.page: (number | optional, default 1) Determines page.pageSize: (number | optional, default 20) Determines how many results to return.filters: Can accept filter parameters.
Sample response
{
"data": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"hostname": "umami.is",
"browser": "chrome",
"os": "Mac OS",
"device": "desktop",
"screen": "1800x1169",
"language": "en-US",
"country": "SE",
"region": "SE-AB",
"city": "Stockholm",
"firstAt": "2025-10-21T13:35:51Z",
"lastAt": "2025-10-21T15:00:09Z",
"visits": 2,
"views": 18,
"createdAt": "2025-10-21T15:00:09Z"
},
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"hostname": "umami.is",
"browser": "safari",
"os": "Mac OS",
"device": "desktop",
"screen": "1512x982",
"language": "en-IN",
"country": "IN",
"region": "IN-GJ",
"city": "Bhavnagar",
"firstAt": "2025-10-21T14:59:47Z",
"lastAt": "2025-10-21T14:59:48Z",
"visits": 1,
"views": 1,
"createdAt": "2025-10-21T14:59:48Z"
}
],
"count": 923,
"page": 1,
"pageSize": 20
}GET /api/websites/:websiteId/sessions/stats
Gets summarized website session statistics.
Parameters
startAt: (number) Timestamp (in ms) of starting date.endAt: (number) Timestamp (in ms) of end date.filters: Can accept filter parameters.
Sample response
{
"pageviews": {
"value": 2924
},
"visitors": {
"value": 905
},
"visits": {
"value": 1050
},
"countries": {
"value": 84
},
"events": {
"value": 517
}
}pageviews: Pages hitsvisitors: Number of unique visitorsvisits: Number of unique visitsbounces: Number of visitors who only visit a single pagetotaltime: Time spent on the website
GET /api/websites/:websiteId/sessions/weekly
Get collected count of sessions by hour of weekday.
Parameters
startAt: (number) Timestamp (in ms) of start date.endAt: (number) Timestamp (in ms) of end date.timezone: Timezone (ex. America/Los_Angeles).filters: Can accept filter parameters.
Sample response
[
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 58, 57, 65, 53, 58, 135],
[117, 124, 132, 127, 135, 142, 141, 138, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
]GET /api/websites/:websiteId/sessions/:sessionId
Gets session details for a individual session
Sample response
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"distinctId": "",
"browser": "chrome",
"os": "Mac OS",
"device": "desktop",
"screen": "1800x1169",
"language": "en-US",
"country": "SE",
"region": "SE-AB",
"city": "Stockholm",
"firstAt": "2025-10-21T13:35:51Z",
"lastAt": "2025-10-21T15:00:09Z",
"visits": 2,
"views": 18,
"events": 12,
"totaltime": 1609
}GET /api/websites/:websiteId/sessions/:sessionId/activity
Gets session activity for a individual session
Parameters
startAt: (number) Timestamp (in ms) of starting date.endAt: (number) Timestamp (in ms) of end date.
Sample response
[
{
"createdAt": "2025-10-21T15:00:09Z",
"urlPath": "/blog",
"urlQuery": "",
"referrerDomain": "umami.is",
"eventId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"eventType": 1,
"eventName": "",
"visitId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"hasData": 0
},
{
"createdAt": "2025-10-21T14:56:30Z",
"urlPath": "/docs",
"urlQuery": "",
"referrerDomain": "umami.is",
"eventId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"eventType": 1,
"eventName": "",
"visitId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"hasData": 0
},
{
"createdAt": "2025-10-21T14:56:30Z",
"urlPath": "/",
"urlQuery": "",
"referrerDomain": "umami.is",
"eventId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"eventType": 1,
"eventName": "",
"visitId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"hasData": 0
}
]GET /api/websites/:websiteId/sessions/:sessionId/properties
Gets session properties for a individual session
Sample response
[
{
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"sessionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dataKey": "email",
"dataType": 1,
"stringValue": "[email protected]",
"numberValue": null,
"dateValue": null,
"createdAt": "2025-10-22T02:28:17Z"
},
{
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"sessionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dataKey": "id",
"dataType": 1,
"stringValue": "910bfde0-21dd-4d24-804d-716035e92ddc",
"numberValue": null,
"dateValue": null,
"createdAt": "2025-10-22T02:28:17Z"
},
{
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"sessionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dataKey": "name",
"dataType": 1,
"stringValue": "Bob Aol",
"numberValue": null,
"dateValue": null,
"createdAt": "2025-10-22T02:28:17Z"
}
]GET /api/websites/:websiteId/session-data/properties
Gets session data counts by property name
Parameters
startAt: (number) Timestamp (in ms) of starting date.endAt: (number) Timestamp (in ms) of end date.filters: Can accept filter parameters.
Sample response
[
{
"propertyName": "id",
"total": 1039
},
{
"propertyName": "region",
"total": 1039
},
{
"propertyName": "name",
"total": 1039
},
{
"propertyName": "email",
"total": 1039
}
]GET /api/websites/:websiteId/session-data/values
Gets session data counts for a given property
Parameters
startAt: (number) Timestamp (in ms) of starting date.endAt: (number) Timestamp (in ms) of end date.propertyName: (string) Property name.filters: Can accept filter parameters.
Sample response
[
{
"value": "EU",
"total": 626
},
{
"value": "US",
"total": 462
}
]