List Sessions (v1)
Method + Path
GET /v1/workspace/:workspaceId/sessions
Actual backend path: /v1/workspace/:workspaceId/sessions
Description
Get a list of all sessions in a workspace, optionally filtered by client, date range, or status.
Authentication
Required - JWT token in Authorization header
Required Permissions:
sessions.view
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
clientId | string | No | Filter by client ID |
dateFrom | string | No | Filter sessions from this date (ISO 8601 datetime) |
dateTo | string | No | Filter sessions to this date (ISO 8601 datetime) |
status | string | No | Filter by status. Valid values: scheduled, in-progress, completed, cancelled |
Response (200)
{
"sessions": [
{
"id": "507f1f77bcf86cd799439011",
"name": "Consultation Session",
"clientId": "507f1f77bcf86cd799439012",
"scheduledAt": "2024-01-20T10:00:00Z",
"status": "scheduled",
"duration": 60,
"createdAt": "2024-01-15T10:00:00Z"
}
]
}
Common Errors
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions (requires
sessions.view) - 404 Not Found: Workspace not found
- 500 Internal Server Error: Server error