---
title: "Create shifts"
method: POST
path: "/scheduler/v2/schedulers/{schedulerId}/shifts"
tags: ["Schedule:v2:Schedulers:Schedule:Shifts (V2):Shifts"]
---

# Create shifts

`POST /scheduler/v2/schedulers/{schedulerId}/shifts`

Create single or multiple shifts under a specific schedule

## Path parameters

- `schedulerId` integer, required — The unique identifier of the schedule

## Query parameters

- `notifyUsers` boolean, nullable — Indicates whether to send a notification to the users assigned to the shifts. This applies only to shifts that are published.

## Request body

- ShiftCreateRequest[]
  - `startTime` integer, required — The start time of the shift in Unix format (in seconds)
  - `endTime` integer, required — The end time of the shift in Unix format (in seconds)
  - `isOpenShift` boolean — Indicates whether the shift is an open shift. Creates only with 1 open spot
  - `openSpots` integer, nullable — Integer with minimum value of 0
  - `timezone` string, nullable — The timezone of the shift in Tz format (e.g. America/New_York). If not specified, it uses the timezone configured in the app settings
  - `title` string, nullable — The title of the shift, If this field remains empty, the jobId field must be specified.
  - `isPublished` boolean — Indicates whether the shift is published
  - `jobId` string, nullable — The ID of the associated job
  - `locationData` LocationDataAPI
    - `isReferencedToJob` boolean, required — Indicates whether the location is referenced to a job. can only be true if job id isn't empty
    - `gps` GpsDataV2
      - `address` string, nullable — The address associated with the GPS data.
      - `longitude` number, nullable — The longitude coordinate.
      - `latitude` number, nullable — The latitude coordinate.
  - `isRequireAdminApproval` boolean, nullable — Indicates whether admin approval is required for claiming the shift. Can only be set if the shift is an open shift
  - `assignedUserIds` integer[] — The list of assigned user IDs for the shift. When vision is enabled, multiple user IDs can be specified. Otherwise, only one user ID can be specified. If the shift is open, this list should remain empty.
  - `notes` HTMLNoteData[] — Additional notes for the shift
    - `html` string, required — The HTML content of the note
  - `statuses` StatusDataCreate[] — The list of statuses associated with the shift
    - `note` string, nullable — The note of the status
    - `gps` GpsDataV2
      - `address` string, nullable — The address associated with the GPS data.
      - `longitude` number, nullable — The longitude coordinate.
      - `latitude` number, nullable — The latitude coordinate.
    - `shouldOverridePreviousStatuses` boolean — Indicates whether to override previous statuses
  - `breaks` ShiftCreateBreakDataApi[] — A list of breaks to create for the shift
    - `name` string, required — The name of the break.
    - `type` 'paid' | 'unpaid', required
    - `startTime` integer, nullable — Integer with minimum value of 0
    - `duration` integer, required — The time the break lasts in minutes
  - `color` string, nullable — The color associated with the shift, defaults to the color of the job linked to the shift. If a specific color is provided, it will override the default job color. Defaults to #4B7AC5. Should be one of the following colors: ['#4B7AC5', '#801A1A', '#AE2121', '#DC7A7A', '#B0712E', '#D4985A', '#E4B37F', '#AE8E2D', '#CBA73A', '#D9B443', '#487037', '#6F9B5C', '#91B282', '#365C64', '#5687B3', '#7C9BA2', '#3968BB', '#85A6DA', '#225A8C', '#548CBE', '#81A8CC', '#4E3F75', '#604E8E', '#8679AA', '#983D73', '#A43778', '#D178AD', '#6B2E4C', '#925071', '#B57D9A', '#3a3a3a', '#616161', '#969696']
  - `shiftDetails` ShiftDetailsInput
    - `shiftLayers` ShiftLayerInput[] — The various layers of information associated with the shift
      - `id` string, required — The unique identifier of the shift layer
      - `value` ShiftLayerInstanceInput, required
        - `id` string, required — The unique identifier of the value
    - `shiftSource` string, nullable — The source of the shift
  - `customFields` BaseCustomFieldV2[] — Custom field values for the shift
    - `customFieldId` integer, required — The custom field unique id
    - `value` unknown, required

## Response `200`

Successful Response

- APIResponseV2ShiftBulkResponse
  - `requestId` string
  - `data` ShiftBulkResponse, required
    - `shifts` V2FeaturesShiftschedulerExternalApiV1SchedulersSchedulerShiftsModelsShiftResponseShiftResponse[], required — The shifts
      - `id` string, required — The ID of the shift
      - `color` string, required — The color of the shift
      - `assignedUserIds` integer[] — The IDs of the assigned users
      - `startTime` integer, required — The start time of the shift
      - `endTime` integer, required — The end time of the shift
      - `timezone` string, required — The timezone of the shift
      - `isOpenShift` boolean, required — Whether the shift is an open shift
      - `title` string, required — The title of the shift
      - `jobId` string, nullable — The ID of the job
      - `locationData` LocationDataAPI
        - `isReferencedToJob` boolean, required — Indicates whether the location is referenced to a job. can only be true if job id isn't empty
        - `gps` GpsDataV2
          - `address` string, nullable — The address associated with the GPS data.
          - `longitude` number, nullable — The longitude coordinate.
          - `latitude` number, nullable — The latitude coordinate.
      - `isPublished` boolean, required — Whether the shift is published
      - `isRequireAdminApproval` boolean, nullable — Whether the shift requires admin approval
      - `updateTime` integer, nullable — Integer with minimum value of 1
      - `creationTime` integer, nullable — Integer with minimum value of 1
      - `createdBy` integer, nullable — Integer with minimum value of 1
      - `openSpots` integer, nullable — The number of open spots
      - `notes` union[] — The notes of the shift
        - union
          - HTMLNoteDataOut
            - `type` string — HTML note type
            - `html` string, required — The HTML content of the note
          - AlbumNoteDataOut
            - `type` string — Album note type
            - `album` ImageNoteDataOut[], required — The list of images in the album
              - …
          - FileNoteDataOut
            - `url` string, required — The url of the file to upload
            - `type` string — URL note type
            - `name` string, required — The name of the file
      - `statuses` StatusData[] — The statuses of the shift
        - `statusId` string, required — The ID of the status
        - `status` 'accepted' | 'checked_in' | 'completed' | 'rejected' | 'claimed' | 'claim_requested' | 'unclaimed' | 'unclaim_requested' | 'cancel_claim_request' | 'reset', required
        - `note` string, nullable — The note of the status
        - `attachments` string[], nullable — The attachments of the status
        - `creationTime` integer, nullable — The creation time of the status
        - `updateTime` integer, nullable — The update time of the status
        - `creatingUserId` integer, required — The ID of the user who created the status
        - `modifyingUserId` integer, nullable — The ID of the user who modified the status
        - `gps` GpsDataV2
          - `address` string, nullable — The address associated with the GPS data.
          - `longitude` number, nullable — The longitude coordinate.
          - `latitude` number, nullable — The latitude coordinate.
        - `assignedUserId` integer, nullable — The ID of the user assigned to the status
      - `breaks` ShiftBreakDataApi[] — The breaks of the shift
        - `id` string, required — The id of the break
        - `name` string, required — The name of the break.
        - `type` 'paid' | 'unpaid', required
        - `startTime` integer, nullable — Integer with minimum value of 0
        - `duration` integer, required — The time the break lasts in minutes
      - `shiftDetails` ShiftDetailsOutput, required
        - `shiftLayers` ShiftLayerOutput[] — The various layers of information associated with the shift
          - `id` string, required — The unique identifier of the shift layer
          - `title` string, required — The name of the shift layer
          - `value` ShiftLayerInstanceOutput, required
            - `id` string, required — The unique identifier of the value
            - `displayName` string, required — The name of the value
        - `shiftSource` string, nullable — The source of the shift
      - `customFields` CustomFieldResponseV2[] — The shift's custom fields
        - `customFieldId` integer, required — The custom field unique id
        - `value` unknown, required
        - `type` 'email' | 'date' | 'phone' | 'number' | 'str' | 'dropdown' | 'file' | 'directManager' | 'birthday' | 'link' | 'location', required
        - `name` string, required — The custom field name

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/connecteam/apis/connecteam-api-documentation.md) · [All operations](https://skmtc.net/connecteam/apis/connecteam-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/connecteam/connecteam-api-documentation/revisions/d8f7f302222e/schema)
