---
title: "Create working hour"
method: POST
path: "/working_hours"
tags: ["Working Hours"]
---

# Create working hour

`POST /working_hours`

This endpoint creates an availability for a provider at the specified location. Exactly one of days, specific_date, or custom_recurrence must be configured.

## Query parameters

- `subdomain` string, required
- `location_id` integer, required

## Headers

- `Nex-Api-Version` string, required

## Request body

- PostWorkingHours — Create working hour
  - `working_hour` object, required — Configure only one of days, specific_date or custom_recurrence
    - `provider_id` integer, required — Id of the provider
    - `begin_time` string, required — At what time working hour starts. Format is HH:MM
    - `end_time` string, required — At what time working hour ends. Format is HH:MM
    - `operatory_id` integer — Id of the operatory
    - `appointment_type_ids` integer[] — Associate appointment types with this working hour
    - `days` string[] — Configure days of the week for this working hour
    - `specific_date` string, date — Configure a specific date for this working hour
    - `custom_recurrence` object — Configure custom recurrence
      - `num` integer, required — Unit count
      - `ref` string, date, required — Starting date
      - `unit` '' | 'day' | 'week' | 'month', required — Every # days/weeks/months
    - `active` boolean — Is this working hour active?

## Response `201`

Successful

- APIV20240412EntitiesWorkingHourBasicResponse — API_V20240412_Entities_WorkingHourBasic_Response model
  - `code` boolean — Indicates the success or failure of the request
  - `description` string — Additional context on the request to help with debugging.
  - `error` string[] — Any errors that occur during the execution of the request.
  - `data` APIV20240412EntitiesWorkingHourBasic
    - `id` integer — Resource id
    - `provider_id` integer, nullable — Provider id
    - `location_id` integer, nullable — Location id
    - `operatory_id` integer, nullable — Operatory id
    - `begin_time` string — Availability start time in the practices timezone
    - `end_time` string — Availability end time in the practices timezone
    - `days` string[], nullable — Configured week days. Empty when the working hour is configured for a custom recurrence
    - `specific_date` string, date, nullable — Configured specific date
    - `custom_recurrence` object, nullable — Configured custom recurrence, with the fields num (recurrence interval count), ref (starting date), and unit (day, week, or month)
    - `tz_offset` string — UTC offset for the practice
    - `active` boolean — Is active?
    - `source` 'manual' | 'synced' — Source of the working hour
    - `label` APIV20240412EntitiesWorkingHourLabel
      - `id` integer — Resource id
      - `location_id` integer, nullable — The location ID
      - `name` string — The name for working hour label
  - `count` integer — Number of total objects, in case of collection.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

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