SnozeDevelopers
API referenceTime tracking

Clock out and close a shift

Closes the shift, stores the optional note, and returns the final shift with its worked and break totals. 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 and a shift that has already ended is refused as a transition conflict.

POST
/v1/workspaces/{workspaceId}/shifts/{shiftId}/clock-out

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
shiftId*string

Request Body

application/json
  1. body
note?string|null
clientMutationId?string|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/shifts/string/clock-out' \  -H 'Content-Type: application/json' \  -d '{}'
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  }}