---
title: "Publish Shifts"
method: POST
path: "/api/v1/scheduling/shifts/publish"
tags: ["Scheduling", "Public API"]
---

# Publish Shifts

`POST /api/v1/scheduling/shifts/publish`

Publishes one or more planned shifts, making them visible to employees. Shifts with scheduling conflicts are skipped and reported as failures. Returns 200 if all shifts succeed, 207 if some shifts failed due to conflicts, or 409 if all shifts failed due to conflicts.

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

## Request body

- object
  - `shiftIds` string[], required — Shift IDs to publish.

## Response `200`

All shifts published successfully

- SchedulingPublishShiftsResultV1 — Result of a bulk publish operation, containing both successfully published shifts and any failures
  - `published` SchedulingSchedulingShiftV1[], required — The shifts that were successfully published.
    - `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
  - `failed` SchedulingPublishShiftsFailureV1[], required — The shifts that failed to publish due to conflicts.
    - `shiftId` string, required — The ID of the shift that failed to publish.
    - `reason` string, required — The reason the shift failed to publish.

## Other responses

- `207` — Some shifts published successfully, but one or more failed due to conflicts
- `403` — Forbidden - user does not have permission
- `409` — All shifts failed to publish due to conflicts
- `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)
