---
title: "Creates a shift"
method: POST
path: "/api/2026-10-01/resources/attendance/shifts"
tags: ["Attendance > Shift"]
---

# Creates a shift

`POST /api/2026-10-01/resources/attendance/shifts`

## Request

- Base URL: `https://api.factorialhr.com`
- URL: `https://api.factorialhr.com/api/2026-10-01/resources/attendance/shifts`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://id.factorialhr.com/oauth/authorize`
    - Token URL: `https://id.factorialhr.com/api/oauth/token` scopes: `time_tracking`
  - API key in header `x-api-key`

Creates a complete shift by specifying both the clock-in and clock-out times. If you need to clock in directly, consider using or subscribing to the [clock-in endpoint](https://apidoc.factorialhr.com/v2025-01-01/reference/post_api-2025-01-01-resources-attendance-shifts-clock-in)

## Request body

- object
  - `employee_id` string: Id of the employee related
  - `date` string, required: Date of the shift
  - `reference_date` string: Reference date of the shift
  - `day` integer: number of days of the shift
  - `clock_in` string: Time of the clock in
  - `clock_out` string: Time of the clock out
  - `observations` string: Comments added to the shift
  - `half_day` string: Boolean that indicates if the shift is a half day
  - `workable` boolean: Boolean that indicates if the shift is workable
  - `location_type` 'office' | 'business_trip' | 'work_from_home': Type of the location
  - `source` 'desktop' | 'mobile' | 'face_recognition' | 'qr_code' | 'mobile_geolocation' | 'shared_device' | 'api' | 'system' | 'desktop_via_one_assistant' | 'mobile_via_one_assistant' | 'mobile_geolocation_via_one_assistant' | 'one_assistant': Source of the shift creation
  - `time_settings_break_configuration_id` string: Id of the break configuration
  - `workplace_id` string: Id of the location related
  - `project_worker_id` string: Id of the project worker the shift is imputed to. A time record for that project is created with the shift.

## Response `201`

CREATED

- AttendanceShift
  - `id` string, required: Unique identifier for the shift
  - `employee_id` string, required: Identifier for the employee assigned to the shift
  - `date` string, required: Date of the shift
  - `reference_date` string, required: The business day this shift is attributed to; can differ from `date` for overnight shifts that cross midnight
  - `clock_in` string: Time when the employee clocked in
  - `clock_out` string: Time when the employee clocked out
  - `in_source` string: Source of the clock-in time
  - `out_source` string: Source of the clock-out time
  - `observations` string: Additional observations about the shift
  - `location_type` 'office' | 'business_trip' | 'work_from_home': Type of location for the shift
  - `half_day` 'beginning_of_day' | 'end_of_day': Which half of the day the shift covers when it is a half-day — `beginning_of_day` or `end_of_day`; null for full-day shifts
  - `in_location_latitude` number: Latitude of the clock-in location
  - `in_location_longitude` number: Longitude of the clock-in location
  - `in_location_accuracy` number: Accuracy of the clock-in location
  - `out_location_latitude` number: Latitude of the clock-out location
  - `out_location_longitude` number: Longitude of the clock-out location
  - `out_location_accuracy` number: Accuracy of the clock-out location
  - `workable` boolean: Whether the shift counts as worked (workable) time rather than a break
  - `created_at` string, required: Timestamp when the shift record was created
  - `workplace_id` string: Identifier for the location
  - `time_settings_break_configuration_id` string: Identifier for the break configuration
  - `company_id` string, required: Identifier for the company
  - `updated_at` string, required: Timestamp when the shift record was updated
  - `minutes` integer, required: Number in minutes of the shift
  - `clock_in_with_seconds` string: Clock in time with seconds

## Changes

- **2026-11-03** `83ac9aa1de50`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/factorialhr/apis/factorial-api/changes/api/2026-10-01/resources/attendance/shifts/post.md)

---

[API](https://skmtc.dev/factorialhr/apis/factorial-api.md) - [All operations](https://skmtc.dev/factorialhr/apis/factorial-api/llms.txt) - [OpenAPI document](https://skmtc.dev/factorialhr/apis/factorial-api/revisions/83ac9aa1de50?raw)
