---
title: "Create appointment"
method: POST
path: "/appointments"
tags: ["Appointments"]
---

# Create appointment

`POST /appointments`

This endpoint books an appointment for the given patient with the given provider at the specified location. When is_guardian is true, the booking is made by a guardian and a patient object with the dependent's details must be provided. Set unavailable to true to create a block instead of a patient appointment.

## Query parameters

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

## Headers

- `Nex-Api-Version` string, required

## Request body

- PostAppointments — Create appointment
  - `appointments_per_timeslot` integer — Number of appointments (default:1, max:5) that can be booked in a single slot. Only supported for eClinicalWorks and NextGen.
  - `appt` object, required — Appointment detail object
    - `patient_id` integer, required — Id of the patient, unless booking is being done by a guardian in which case use the guardian's patient id
    - `provider_id` integer, required — Provider id
    - `operatory_id` integer — Required if bookings are mapped to operatories for this location
    - `start_time` string, date-time, required — Appointment start time. Must be a parseable date/time string, recommended format is YYYY-MM-DDThh:mm:ss+0000
    - `end_time` string, date-time — Appointment end time. Must be a parseable date/time string. Recommended format is YYYY-MM-DDThh:mm:ss+0000.
    - `appointment_type_id` integer — The appointment type for this appointment
    - `note` string — A note that will be written to the EHR. 128 character limit.
    - `unavailable` boolean — Denote this block of time as unavailable on the schedule, don't specify a patient_id with this
    - `is_guardian` boolean — Flag to denote this booking is being made by the patient's guardian. If true, patient object must be provided
    - `is_new_clients_patient` boolean — Indicates the booking is for a new patient
    - `referrer` string — Optionally capture the URL where the booking was made
    - `patient` object — Patient details required when is_guardian is true
      - `first_name` string, required — Patient's first name
      - `last_name` string, required — Patient's last name
      - `bio` object, required — Patient Bio
        - `date_of_birth` string, date, required — Patient date of birth. Must be a parseable date string, recommended format is YYYY-MM-DD
        - `gender` 'Male' | 'Female' | 'Other' — Patient gender. Gender will default to Female if not provided
    - `descriptor_ids` integer[] — Associate descriptors with this appointment, which will also be synchronized on insertion

## Response `201`

Successful

- APIV2EntitiesAppointmentResponseResponse — API_V2_Entities_AppointmentResponse_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` APIV2EntitiesAppointmentResponse
    - `appt` APIV2EntitiesAppointmentWithoutIncludes
      - `id` integer — Appointment id
      - `patient_id` integer, nullable — Appointment patient id
      - `provider_id` integer, nullable — Provider id
      - `provider_name` string, nullable — Provider name
      - `start_time` string, date-time — Appointment scheduled start time in UTC
      - `confirmed` boolean, nullable — Appointment confirmation status
      - `patient_missed` boolean, nullable — Did the patient no show? Not supported by all integrations
      - `created_at` string, date-time — Appointment created time in UTC
      - `updated_at` string, date-time — Appointment last updation time in UTC
      - `note` string, nullable — Appointment note
      - `end_time` string, date-time — Appointment scheduled end time in UTC
      - `unavailable` boolean, nullable — Is this appointment a scheduling block (blocks off the schedule)
      - `cancelled` boolean — Is this appointment cancelled?
      - `timezone` string — Appointment timezone
      - `institution_id` integer — Institution id
      - `appointment_type_id` integer, nullable — Nexhealth appointment_type id, 0 if not set
      - `checkin_at` string, date-time, nullable — Time the patient checked in at in UTC. Not supported by all integrations
      - `location_id` integer, nullable — Appointment location id
      - `foreign_id` string, nullable — Unique identifier of this resource from the integrated system
      - `foreign_id_type` string — Unique identifier for the integrated system itself
      - `misc` object, nullable — Miscellaneous information for the appointment. The is_booked_on_nexhealth key indicates whether the appointment was booked through NexHealth
      - `last_sync_time` string, date-time, nullable — Last Sync time in UTC
      - `patient_confirmed` boolean, nullable — Is this appointment confirmed by the patient (as opposed to the office)?
      - `created_by_user_id` integer, nullable — Id of the user who booked the appointment
      - `is_guardian` boolean, nullable — Was the appointment booked by a guardian?
      - `patient_confirmed_at` string, date-time, nullable — Time of patient_confirmation in UTC
      - `cancelled_at` string, date-time, nullable — Time of appointment cancellation in UTC. Note this will not be reset if the appointment is uncancelled
      - `is_new_clients_patient` boolean, nullable — Is this a new patient at this practice?
      - `confirmed_at` string, date-time, nullable — Time of appointment confirmation by the office in UTC
      - `sooner_if_possible` boolean, nullable — Does patient want an earlier time?
      - `operatory_id` integer, nullable — Operatory id for the appointment
      - `checked_out` boolean, nullable — Has the patient checked out? Not supported by all integrations
      - `checked_out_at` string, date-time, nullable — Time of check out in UTC
      - `referrer` string, nullable — Optional field to store URI origin of the booking
      - `is_past_patient` boolean, nullable — Does this patient have prior appointments?
      - `timezone_offset` string — Timezone offset string
    - `stripe_client_secret` string
  - `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)
