WorkSchedule > Schedule

Creates a Schedule

Changed on

Creates a Schedule

post/api/2026-10-01/resources/work_schedule/schedules

Request

  • Base URL
    https://api.factorialhr.com
  • URL
    https://api.factorialhr.com/api/2026-10-01/resources/work_schedule/schedules
  • Auth
    • OAuth 2
      Authorization code: https://id.factorialhr.com/oauth/authorize
      Token URL: https://id.factorialhr.com/api/oauth/token scopes: time_tracking
    • or API key in header x-api-key

Request body

namestring required

Name of the new schedule

schedule_typestring required

Whether the schedule is flexible or fixed

Example request

{
  "name": "Morning shift",
  "schedule_type": "flexible"
}

Response

CREATED

idstring required

Identifier of the schedule

namestring required

Name of the schedule

archived_atstring

When the schedule was archived; null when the schedule is active

company_idstring required

Identifier of the company the schedule belongs to

created_atstring required

When the schedule was created

updated_atstring required

When the schedule was last updated

employee_idsstring[] required

Identifiers of the employees assigned to the schedule

Example response

{
  "id": "1",
  "name": "Morning shift",
  "company_id": "1",
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "employee_ids": [
    "1",
    "2"
  ],
  "periods": [
    {
      "id": 1,
      "schedule_id": 1,
      "default": false,
      "start_day": 15,
      "start_month": 12,
      "end_day": 31,
      "end_month": 12,
      "schedule_type": "flexible"
    }
  ]
}

Changes