---
title: "Create Shift"
method: POST
path: "/api/v1/scheduling/shifts"
tags: ["Scheduling", "Public API"]
---

# Create Shift

`POST /api/v1/scheduling/shifts`

Creates a new shift in the specified schedule.

OAuth Scopes: scheduling:shifts.write, time_tracking.write

## Request body

- SchedulingCreateSchedulingShiftRequestV1 — Fields required to create a scheduling shift.
  - `scheduleId` string, uuid, required — The ID of the schedule the shift belongs to.
  - `name` string, nullable — The name of the shift.
  - `status` 'planned' | 'published', required — The status of the shift.
  - `color` string, required — 6 character color hex code.
  - `timezone` string, required — The timezone for the shift. Defaults to schedule timezone.
  - `capacity` integer, nullable — The expected headcount for the shift. If null, has no restrictions.
  - `employeeIds` integer[] — What employees are assigned to this shift?
  - `start` string, date-time, required — UTC timestamp of the start of the shift.
  - `end` string, date-time, required — UTC timestamp of the end of the shift.
  - `recurrenceRule` string, nullable — The recurrence rule. Follows the iCalendar RFC 5545 RRULE syntax.
  - `recurrenceDtstart` string, nullable — The UTC start time for a recurring shift (anchor point for the recurrence rule).
  - `recurrenceDtend` string, nullable — The UTC end time for a recurring shift.
  - `recurrenceUntil` string, nullable — The UTC datetime when the recurrence series stops generating new occurrences (UNTIL in RRULE).

## Response `201`

Successfully created a shift.

- SchedulingSchedulingShiftV1 — A shift for scheduling
  - `id` string, required — The ID of the shift. This can be the UUIDv7 of the shift instance, or a composite ID (<recurringShiftDefinitionId>_<recurrenceId>) for uninstantiated recurring shifts.
  - `scheduleId` string, uuid, required — The ID of the schedule the shift belongs to.
  - `name` string, nullable — The name of the shift.
  - `status` 'planned' | 'published' | 'cancelled' | 'deleted', required — The status of the shift.
  - `color` string, required — 6 character color hex code.
  - `capacity` integer, nullable — The expected headcount for the shift. Defaults to 1 if unset.
  - `start` string, date-time, nullable, required — UTC timestamp of the start of the shift.
  - `end` string, date-time, nullable, required — UTC timestamp of the end of the shift.
  - `timezone` string, required — The timezone for the shift.
  - `recurrenceRule` string, nullable — The recurrence rule. Follows the iCalendar RFC 5545 RRULE syntax.
  - `recurrenceId` string, nullable — The stable identifier for a recurrence, which is the original start of shift according to recurrence rules. Null for non-recurring shifts.
  - `recurrenceDtstart` string, nullable — The UTC start time for a recurring shift and the anchor point for the recurrence rule. Null for non-recurring shifts.
  - `recurrenceDtend` string, nullable — The UTC end time for a recurring shift. Null for non-recurring shifts.
  - `recurrenceUntil` string, nullable — The UTC datetime when the recurrence series stops generating new occurrences (UNTIL in RRULE). Null for non-recurring shifts.
  - `employeeIds` integer[] — The list of employee IDs currently assigned.
  - `unpublishedChanges` object, nullable — The pending changes that have not been published.
  - `createdAt` string, date-time — UTC timestamp when the shift was created
  - `updatedAt` string, date-time, nullable — UTC timestamp when the shift was last updated
  - `deletedAt` string, date-time, nullable — UTC timestamp when the shift was deleted

## Other responses

- `403` — Forbidden - user does not have permission.
- `404` — Not Found - the referenced schedule does not exist.
- `422` — Invalid request data.

---

[API](https://skmtc.net/bamboohr/apis/bamboohr-api.md) · [All operations](https://skmtc.net/bamboohr/apis/bamboohr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bamboohr/bamboohr-api/versions/19ebf391a399/schema)
