Get Visit Session Details (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/analytics/sessions/:sessionId
Description
Retrieve detailed information about a specific visit session, including all page views and interactions.
Authentication
Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace.read permission.
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
sessionId | string | Yes | Visit session identifier |
Response 200 OK
{
"session": {
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"type": "storefront",
"destinationSlug": "my-store",
"source": "tracking-link",
"trackingLinkId": "507f1f77bcf86cd799439013",
"firstVisitAt": "2025-01-15T10:30:00.000Z",
"lastVisitAt": "2025-01-15T10:45:00.000Z",
"pageViewCount": 5,
"sessionDuration": 900,
"userAgent": "Mozilla/5.0...",
"ipAddress": "192.168.1.1",
"pageViews": [
{
"id": "507f1f77bcf86cd799439014",
"pagePath": "/my-store/products/507f1f77bcf86cd799439015",
"visitedAt": "2025-01-15T10:30:00.000Z",
"referrer": "https://facebook.com"
}
]
}
}
Response Fields
session: Visit session object (see List Visit Sessions for base fields)pageViews(array): Array of page view objects within the sessionid(string): Page view identifierpagePath(string): Page path visitedvisitedAt(string): Visit timestamp (ISO 8601 format)referrer(string | null): Referrer URL
Common Errors
401 Unauthorized: Missing or invalid authentication token
403 Forbidden: User does not have workspace.read permission
404 Not Found: Workspace or session not found
500 Internal Server Error: Server error occurred while processing the request