SnozeDevelopers
API referenceTime tracking

Read the caller's open shift

Returns the caller's currently open or on-break shift in this workspace with its authoritative worked milliseconds, or null when they are not clocked in. Requires a workspace member with `time_entries:read` and the `time_tracking_v1` control enabled.

GET
/v1/workspaces/{workspaceId}/shifts/active

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string

Response Body

Success

application/json
  1. response
data*|null
Example Request
curl -X GET 'https://api.snoze.dev/v1/workspaces/string/shifts/active'
Example Response
{  "data": {    "shift": {      "id": "string",      "workspaceId": "string",      "userId": "string",      "userDisplayName": "string",      "status": "open",      "startedAt": "string",      "endedAt": "string",      "breakStartedAt": "string",      "accumulatedBreakMs": 0,      "workedMs": 0,      "closedBy": "user",      "note": "string",      "createdByUserId": "string",      "updatedByUserId": "string",      "createdAt": "string",      "updatedAt": "string"    },    "serverTime": "string",    "authoritativeWorkedMs": 0  }}