Clock in and open a shift
Opens a shift for the caller with an optional note and returns it with the server clock. Requires a workspace member with `time_entries:write` and the `time_tracking_v1` control enabled. A unique index enforces one open shift per person, so a caller who is already clocked in is refused as a transition conflict. Repeating the same `clientMutationId` replays the original shift rather than opening a second one.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/workspaces/string/shifts" \ -H "Content-Type: application/json" \ -d '{}'{ "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 }}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}List shifts in a workspace
Returns shifts narrowed by `from`, `to`, `memberId`, and `status`, each with its worked and break totals. Requires a workspace member with `time_entries:read` and the `time_tracking_v1` control enabled; an invalid date, a reversed range, or a malformed `memberId` is rejected. Pass `limit` to cap the page size.
Start a break on an open shift
Moves the shift to `on_break` and pauses whatever timer the shift was running, so break time never lands on a customer's invoice, then returns the shift. Requires a workspace member with `time_entries:write` and the `time_tracking_v1` control enabled, and only the person on shift may control it. An unknown shift is reported as not found; a shift already on break is returned unchanged, and any other state is refused as a transition conflict.