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
AuthorizationBearer <token>

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

In: header

Path Parameters

workspaceId*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/workspaces/string/shifts/active"
{  "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  }}