# Shifts

Manage workspace work-schedule shifts (fixed or flexible, one-off or recurring) and their member assignments. PAID feature — requires the Plus plan and above OR the Shift add-on, plus Owner/Executive Manager role. Times are expressed in each shift's own IANA timezone.

## Get All Shifts

 - [GET /shifts](https://api-docs.webwork-tracker.com/api/shifts/getshifts.md): List workspace work-schedule shifts (paginated). Optional filters: member_id (only shifts a given user is assigned to) and a date window via week (any date in the ISO week) or date_from/date_to. Each logical shift is identified by its uuid. Access: PAID feature — Plus plan and above OR the Shift add-on — plus Owner/Executive Manager. Workspaces without shifts access, or that are suspended / past trial, get 403.

## Create New Shift

 - [POST /shifts](https://api-docs.webwork-tracker.com/api/shifts/createshift.md): Create a new shift. name must be unique per workspace (max 100). Times are given in the shift's own timezone (IANA). For shift_type: fixed supply a single start_time/end_time/min_hours; for shift_type: flexible supply a per-day schedule. working_days is required for recurring (repeat: weekly|biweekly) fixed shifts. A shift whose window collides with an existing shift for one of the selected members returns 422 with errors.conflicts. Access: PAID feature — Plus plan and above OR the Shift add-on — plus Owner/Executive Manager.

## Get Single Shift

 - [GET /shifts/{shift_id}](https://api-docs.webwork-tracker.com/api/shifts/getshift.md): Retrieve a single shift by its uuid. Owner-scoped. Access: PAID feature — Plus plan and above OR the Shift add-on — plus Owner/Executive Manager.

## Update Shift

 - [PUT /shifts/{shift_id}](https://api-docs.webwork-tracker.com/api/shifts/updateshift.md): Update a shift. All create fields are accepted (each optional on update); times are interpreted in the supplied timezone. A window that collides with an existing shift for one of the selected members returns 422 with errors.conflicts. Access: PAID feature — Plus plan and above OR the Shift add-on — plus Owner/Executive Manager.

## Delete Shift

 - [DELETE /shifts/{shift_id}](https://api-docs.webwork-tracker.com/api/shifts/deleteshift.md): Soft-delete a shift and all rows sharing its uuid. Access: PAID feature — Plus plan and above OR the Shift add-on — plus Owner/Executive Manager.

## Assign Member to Shift

 - [POST /shifts/{shift_id}/assign/{member_id}](https://api-docs.webwork-tracker.com/api/shifts/assignshiftmember.md): Assign a member to a shift. shift_id is the shift uuid; member_id is a raw integer user id that must belong to the workspace. Assign is add-only: re-assigning a member already on the shift returns 422 (not a 200 no-op). The same shift-overlap guard as create/update applies — if joining would double-book the member against an overlapping shift, the call is rejected 422 with a conflicts list. On success the full shift object is returned. Access: PAID feature — Plus plan and above OR the Shift add-on — plus Owner/Executive Manager.

## Unassign Member from Shift

 - [DELETE /shifts/{shift_id}/unassign/{member_id}](https://api-docs.webwork-tracker.com/api/shifts/unassignshiftmember.md): Remove a member from a shift. shift_id is the shift uuid; member_id is a raw integer user id. The shift is never deleted by this endpoint: unassigning the last remaining member is refused with 409 (message: "Cannot unassign the last member of a shift. Use DELETE /shifts/{shift_id} to remove the shift.") — use the explicit delete endpoint instead. Returns 404 if the shift is missing or the member is not assigned. Access: PAID feature — Plus plan and above OR the Shift add-on — plus Owner/Executive Manager.

