Sessions

Get a visitor's session activity

GET/api/websites/{websiteId}/sessions/{sessionId}/activity

Returns activity for the specified session and sessions linked by visitor identity, using the requested date range and optional distinct ID.

Try it

GET/api/websites/{websiteId}/sessions/{sessionId}/activity
Authorization

Credentials stay in this browser tab and are never sent anywhere except the API.

Path parameters
Query parameters
Response

Send a request to see the response.

Headers

NameTypeDescription
AuthorizationrequiredstringToken returned by POST /api/auth/login, or an API key (`umami_…`) created under Settings → API keys (self-hosted only). Bearer <token>.
x-umami-share-contextrequiredstringRequired context header when authenticating with a share token. <api-key>.
x-umami-share-tokenrequiredstringSigned token returned by a share endpoint. <api-key>.

Path parameters

NameTypeDescription
websiteIdrequiredstringID of the website.
sessionIdrequiredstringID of the visitor session.

Query parameters

NameTypeDescription
startAtintegerStart of the date range as a Unix timestamp in milliseconds.
endAtintegerEnd of the date range as a Unix timestamp in milliseconds.
distinctIdstringCustom identifier assigned to the visitor.
periodenum<string>Relative date range, for example 7d or 30day, used instead of an explicit startAt/endAt range.
Options: today, 24h, 7d, 30d, 0day, 24hour, 0week, 7day, 0month, 30day, 90day, 0year, 6month, 12month

Responses

200The operation completed successfully.
NameTypeDescription
createdAtrequiredstringDate and time the record was created.
eventIdrequiredstringID of the event.
eventNamerequiredstringName of the custom event.
eventTyperequirednumberEvent type: 1 for a pageview or 2 for a custom event.
hasDatarequiredboolean
hostnamerequiredstringHostname on which the activity occurred.
referrerDomainrequiredstringDomain of the referring page.
urlPathrequiredstringPath portion of the page URL.
urlQueryrequiredstringQuery string portion of the page URL.
visitIdrequiredstringID of the visit.
200 example
400Bad request.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
400 example
401Unauthorized.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
401 example

Code samples

cURL