Create a shift
wheniwork_create_shiftCreate one shift on a schedule — assigned to a user, or open (user_id 0). Created as a draft unless published is true. Undo by editing it or unpublishing. When I Work: POST /2/shifts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | Hex colour without #, e.g. cc0000. | |
| notes | No | Shift notes shown to the employee. | |
| site_id | No | Job site for the shift. | |
| user_id | No | The user to assign. 0 (or omitted on create) makes it an open shift. | |
| end_time | Yes | Shift end, date-time with offset. | |
| is_shared | No | For an open shift: a shared open shift. | |
| published | No | Publish it immediately (default: draft). | |
| break_time | No | Unpaid break length in hours, e.g. 0.5. | |
| start_time | Yes | Shift start, date-time with offset, e.g. 2026-10-05T08:00:00-05:00. | |
| location_id | Yes | The schedule (location) the shift belongs to id. | |
| position_id | No | Position for the shift. |