Scheduling
Public API

Create Schedule

Changed on

Creates a new schedule for the company. Rejects duplicate schedule data for the same location and configuration.

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

post/api/v1/scheduling/schedules

Request

Request body

namestring required

The name of the schedule

locationIdinteger required

The ID of the location the schedule belongs to

timezonestring nullable

The timezone of the schedule. Required for remote locations. For non-remote locations, the location timezone is used.

startOfWeekstring required

The starting day of the week for the schedule

earlyClockInThresholdinteger

The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule

lateClockInThresholdinteger nullable

The threshold (in minutes) after a shift starts before an employee is considered late clocking in

earlyClockOutThresholdinteger nullable

The threshold (in minutes) before a shift ends within which an employee is considered to have clocked out early

lateClockOutThresholdinteger nullable

The threshold (in minutes) after a shift ends before an employee is considered to have clocked out late

managerUserIdsinteger[] required

User IDs of managers for this schedule. At least one manager is required to create a schedule.

employeeIdsinteger[]

Employee IDs assigned to this schedule

claimsRequireApprovalDefaultboolean nullable

Whether a claim on a shift created under this schedule requires manager approval by default. Only applies at shift creation time. Defaults to true.

autoPublishLeadTimeUnit'weeks' | 'days' nullable

Auto-publish lead time unit. Optional. If provided, autoPublishLeadTimeQuantity must also be provided as non-null in the same request — providing only one of the pair is invalid. Omit both to leave auto-publish disabled.

autoPublishLeadTimeQuantityinteger nullable

Auto-publish lead time quantity. Optional. If provided, autoPublishLeadTimeUnit must also be provided as non-null in the same request — providing only one of the pair is invalid. Omit both to leave auto-publish disabled. Must not exceed 8 when autoPublishLeadTimeUnit is 'weeks', or 56 when it is 'days'.

Example request

{
  "name": "Morning Shift",
  "locationId": 1,
  "timezone": "America/Denver",
  "startOfWeek": "Monday",
  "earlyClockInThreshold": 15,
  "lateClockInThreshold": 10,
  "earlyClockOutThreshold": 5,
  "lateClockOutThreshold": 15,
  "managerUserIds": [
    1,
    2,
    3
  ],
  "employeeIds": [
    10,
    20,
    30
  ],
  "claimsRequireApprovalDefault": true,
  "autoPublishLeadTimeUnit": "weeks",
  "autoPublishLeadTimeQuantity": 2
}

Response

Schedule created successfully

idstring uuid

The UUID of the schedule

namestring

The name of the schedule

locationIdinteger

The ID of the location the schedule belongs to

timezonestring

The timezone of the schedule, provide if location is missing timezone

startOfWeekstring

The starting day of the week for the schedule

earlyClockInThresholdinteger

The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule

lateClockInThresholdinteger

The threshold (in minutes) after a shift starts before an employee is considered late clocking in

earlyClockOutThresholdinteger

The threshold (in minutes) before a shift ends within which an employee is considered to have clocked out early

lateClockOutThresholdinteger

The threshold (in minutes) after a shift ends before an employee is considered to have clocked out late

claimsRequireApprovalDefaultboolean

Whether a claim on a shift created under this schedule requires manager approval by default. Only applies at shift creation time; changing this value never affects existing shifts.

managerUserIdsinteger[]

What users manage this schedule

employeeIdsinteger[]

What employees are assigned to this schedule

createdAtstring date-time

UTC timestamp when the schedule was created

updatedAtstring date-time nullable

UTC timestamp when the schedule was last updated

deletedAtstring date-time nullable

UTC timestamp when the schedule was deleted

autoPublishLeadTimeUnit'weeks' | 'days' nullable

The unit of the auto-publish lead time. Null when auto-publish is not enabled for this schedule.

autoPublishLeadTimeQuantityinteger nullable

The quantity of the auto-publish lead time. Null when auto-publish is not enabled for this schedule.

nextAutoPublishAtstring date-time nullable

UTC timestamp of the next scheduled auto-publish run. Null when auto-publish is not enabled for this schedule.

lastAutoPublishAtstring date-time nullable

UTC timestamp of the most recent successful auto-publish run. May be set even when auto-publish is not currently enabled.

Example response

{
  "id": "0199de9b-6bcb-77e7-941d-3caf74b9a372",
  "name": "Main Schedule",
  "locationId": 123,
  "timezone": "America/Denver",
  "startOfWeek": "Monday",
  "earlyClockInThreshold": 10,
  "lateClockInThreshold": 10,
  "earlyClockOutThreshold": 5,
  "lateClockOutThreshold": 15,
  "claimsRequireApprovalDefault": true,
  "managerUserIds": [
    1,
    2
  ],
  "employeeIds": [
    10,
    20
  ],
  "createdAt": "2025-01-01T06:00:00Z",
  "updatedAt": "2025-01-01T06:00:00Z",
  "deletedAt": "2025-01-01T06:00:00Z",
  "autoPublishLeadTimeUnit": "weeks",
  "autoPublishLeadTimeQuantity": 2,
  "nextAutoPublishAt": "2026-07-05T06:00:00Z",
  "lastAutoPublishAt": "2026-06-28T06:00:00Z"
}

Changes

    • breaking

      the request property became required

    • info

      the security scope scheduling:schedules.write was added to the endpoint's security scheme oauth

    • info

      the security scope time_tracking.write was removed from the endpoint's security scheme oauth

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status