---
title: "Create Shift"
method: POST
path: "/v2/company/{company_id}/shifts"
tags: ["Shifts"]
---

# Create Shift

`POST /v2/company/{company_id}/shifts`

## Request

- Base URL: `https://api.7shifts.com`
- URL: `https://api.7shifts.com/v2/company/{company_id}/shifts`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://app.7shifts.com/oauth2/authorize`
    - Client credentials
    - Password
    - Token URL: `https://app.7shifts.com/oauth2/token`
  - API key in cookie `7session`

## Path parameters

- `company_id` integer, required

## Headers

- `x-api-version` string: An API version
- `x-company-guid` string, uuid

## Request body

- object
  - `location_id` integer, required: Shift ID
  - `user_id` integer: User ID
  - `department_id` integer, nullable: Department ID. Required if the location uses departments.
  - `role_id` integer, nullable: Role ID. Required if the location uses roles.
  - `station_id` integer, nullable: Station Number
  - `start` string, date-time, required: Start date time of the shift. UTC in ISO8601 format.
  - `end` string, date-time, required: End date time of the shift. UTC in ISO8601 format.
  - `close` boolean, nullable: Set to true if the shift ends at closing time. If set, end is not used.
  - `business_decline` boolean, nullable: Set to true if the shift ends at business decline.
  - `notes` string, nullable: Notes displayed on a shift.
  - `draft` boolean, nullable: If true the shift is not published.
  - `notified` boolean, nullable: If true the user has been notified of the published shift.
  - `open` boolean, nullable: Set to true if the shift is not assigned to any user. Open shifts can be requested by users.
  - `open_offer_type` integer, nullable: Set when open is true. Set to 1 for everyone can request an open shift; set to 1 if only offered to specified role.
  - `list_in_job_network` boolean, nullable: Set to true if the shift should be made available to the 7shifts job network.
  - `job_network_wage` number, nullable: The wage to offer the shift at in the 7shifts job network.
  - `unassigned` boolean, nullable: Internal use only
  - `unassigned_skill_level` 1 | 2 | 3, nullable: The skill level required for this shift.
  - `status` 0 | 1 | 2 | 3 | 4 | 5, nullable: Shift status type. 0 - none, 1 - sick, 2 - no show, 3 - late, 4 - call out, 5 - left late.
  - `late_minutes` integer, nullable: Number of minutes a user can clock in late after the shift starts.
  - `breaks` object[], nullable: Breaks to be created with the shift
    - `break_type_id` integer, required: Break type ID
    - `start` string, date-time, nullable: Start date time of the break. UTC in ISO8601 format.

## Response `201`

Shift created

- object
  - `object` 'shift', required
  - `data` object, required
    - `id` integer, required: Shift ID
    - `user_id` integer, nullable, required: User ID
    - `start` string, date-time, required: Start date time of the shift. UTC in ISO8601 format
    - `end` string, date-time, required: End date time of the shift. UTC in ISO8601 format
    - `close` boolean, required: If true the shift ends at closing time. If set end is not used.
    - `business_decline` boolean, required: If true the shift ends at business decline.
    - `hourly_wage` number: Read Only. The hourly wage for this shift. In cents.
    - `department_id` integer, nullable, required: Department ID. Required if the location uses departments.
    - `location_id` integer, required: The ID of the location that the shift is assigned to.
    - `role_id` integer, nullable, required: Role ID. Required if the location uses roles.
    - `notes` string, required: Notes displayed on a shift
    - `draft` boolean, required: Whether or not the shift is a draft shift. Draft shifts are shifts that have not yet been published.
    - `notified` boolean, required: Whether or not the individual assigned to the shift has been notified of the shifts existence.
    - `open` boolean, required: If true the shift is not assigned to any user. Open shifts can be requested by users.
    - `unassigned` boolean, required: Shifts in a template that could not be assigned to any eligible employees.
    - `unassigned_skill_level` integer, required: Specify the minimum user skill level required for the shift. Levels 1 - beginner, 2 - intermediate, 3 - Experienced.
    - `open_offer_type` 'all_location_members' | 'all_role_members' | 'set_of_location_members' | 'all_company_employees', nullable, required: Specifies the scope of who can pick up the shift.
    - `attendance_status` 'none' | 'sick' | 'no_show' | 'late' | 'called_off' | 'called_in' | 'custom', required: Specified shift flags to track employee attendance
    - `custom_flag` object, nullable: Custom shift flag assigned to this shift, present when attendance_status is 'custom'
      - `id` integer, required
      - `name` string, required
      - `color` string, required
    - `publish_status` 'draft' | 'published' | 'draft_deleted' | 'published_deleted', required: Current publication status of the shift
    - `late_minuets` integer: Specify the grace minutes they can clock-in late.
    - `created` string, date-time, nullable, required: The created date of the shift in UTC
    - `modified` string, date-time, nullable, required: The last modified date of the shift in UTC
    - `deleted` boolean, required: Whether or not this shift is deleted.
    - `soft_deleted` string, nullable, required: Whether or not this shift is soft-deleted.
    - `station` integer, required: Station Number
    - `station_name` string, nullable, required: Station name
    - `station_id` integer, nullable, required: Station id
    - `breaks` object[], nullable: Breaks on the shift
      - `id` integer, required: Break ID
      - `shift_id` integer, required: Shift ID
      - `start` string, date-time, nullable: Start date time of the break. UTC in ISO8601 format.
      - `end` string, date-time, nullable: End date time of the break. UTC in ISO8601 format.
      - `name` string, required: Break type name
      - `length` integer, required: Break type length in minutes
      - `break_type_id` integer, required: Break type ID
      - `type` 'paid' | 'unpaid': Break type paid or unpaid

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/7shifts/apis/7shifts-api.md) - [All operations](https://skmtc.dev/7shifts/apis/7shifts-api/llms.txt) - [OpenAPI document](https://skmtc.dev/7shifts/apis/7shifts-api/revisions/40e0ef40dfcd?raw)
