Scheduling
Public API
Create Shift
Changed onCreates a new shift in the specified schedule. While Open Shifts is enabled, a shift created as published must have at least one employee assigned or allow claiming.
OAuth Scopes: scheduling:shifts.write, time_tracking.write
post/api/v1/scheduling/shifts
Request
- Base URLhttps://companySubDomain.bamboohr.com
- Auth
- HTTP basic
- or OAuth 2Authorization code/authorize.phpToken URL/token.phpScopesscheduling:shifts.write
- or OAuth 2Authorization code/authorize.phpToken URL/token.phpScopestime_tracking.write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"scheduleId": "0199de9b-6bcb-77e7-941d-3caf74b9a372",
"name": "Morning Shift",
"color": "00FFAA",
"timezone": "America/Denver",
"capacity": 1,
"start": "2025-01-01T06:00:00Z",
"end": "2025-01-01T14:00:00Z",
"recurrenceRule": "FREQ=WEEKLY;INTERVAL=1",
"recurrenceDtstart": "2024-01-01T09:00:00Z",
"recurrenceDtend": "2024-12-01T17:00:00Z",
"recurrenceUntil": "2024-12-31T23:59:59Z"
}Response
Successfully created a shift.
Example response
{
"id": "019aa09f-0712-74cb-9186-8ad0eb6038dc_20240101T093000",
"scheduleId": "0199de9b-6bcb-77e7-941d-3caf74b9a372",
"name": "Morning Shift",
"color": "00FFAA",
"capacity": 1,
"claimsRequireApproval": true,
"start": "2025-01-01T06:00:00Z",
"end": "2025-01-01T14:00:00Z",
"timezone": "America/Denver",
"recurrenceRule": "FREQ=WEEKLY;INTERVAL=1",
"recurrenceId": "20240101T090000",
"recurrenceDtstart": "2024-01-01T09:00:00Z",
"recurrenceDtend": "2024-12-31T23:59:59Z",
"recurrenceUntil": "2024-12-31T23:59:59Z",
"employeeIds": [
10,
20
],
"createdAt": "2025-01-01T06:00:00Z",
"updatedAt": "2025-01-01T06:00:00Z",
"deletedAt": "2025-01-01T06:00:00Z"
}Changes
- warning
the
/request property's max was set to999.00 - info
the security scope
scheduling:shifts.writewas added to the endpoint's security schemeoauth - info
the security scope
time_tracking.writewas removed from the endpoint's security schemeoauth - info
added the new optional request property
- info
added the new optional request property
- info
added the required property
to the response with the status - info
added the required property
to the response with the status
- warning