Skip to Content
Webhook IntegrationSync Appointments

Sync Appointments (Inbound)

Push appointment data from your EHR to Insight Health whenever appointments are created, updated, or cancelled.

  • Direction: Your EHR → Insight Health
  • Method: POST /v2/webhooks/{ehr}/sync-appointments

Replace {ehr} with your assigned EHR identifier (e.g., nexus, medicat).

Headers

PropertyTypeDescription
Content-Type*
stringMust be application/json.
X-API-Key*
stringYour API key.
X-Webhook-Signature*
stringHMAC-SHA256 signature formatted as sha256=<hex>. See Authentication.
* Required field

Request body

The top-level payload contains an appointments array. Each entry groups an appointment with its associated patient, practitioner, location, and encounter.

{ "appointments": [ { "appointment": { ... }, "patient": { ... }, "practitioner": { ... }, "location": { ... }, "encounter": { ... }, "department_id": "dept-01" } ] }

You can also send a single object with an appointment key at the top level without wrapping it in an appointments array. It will be processed as a single-item batch.

appointment

PropertyTypeDescription
id*
stringUnique appointment ID in your EHR.
status*
stringAppointment status. See Status Reference for accepted values.
start_time*
stringAppointment start date and time. Format: MM/DD/YYYY HH:MM.
start_date*
stringAppointment date only. Format: MM/DD/YYYY.
created_time*
stringWhen the appointment was originally scheduled. Format: MM/DD/YYYY HH:MM.
type*
stringAppointment or visit type (e.g., "Follow-up", "New Patient").
duration
stringDuration in minutes (e.g., "30").
reason
stringReason for the appointment or chief complaint.
notes
stringFree-text scheduling notes.
* Required field

patient

PropertyTypeDescription
id*
stringUnique patient ID in your EHR.
first_name*
stringPatient's first name.
last_name*
stringPatient's last name.
birth_date*
stringDate of birth. Format: MM/DD/YYYY.
gender*
stringPatient gender (e.g., "Male", "Female", "Other").
middle_name
stringPatient's middle name.
phone
stringPatient's phone number.
email
stringPatient's email address.
* Required field

practitioner

PropertyTypeDescription
id*
stringUnique provider or practitioner ID in your EHR.
first_name*
stringPractitioner's first name.
last_name*
stringPractitioner's last name.
* Required field

location

PropertyTypeDescription
name
stringName of the clinic or location (e.g., "Main Clinic").
* Required field

encounter

PropertyTypeDescription
id
stringEncounter or visit ID in your EHR.
reason
stringClinical reason for the encounter.
* Required field

Top-level fields

PropertyTypeDescription
department_id
stringDepartment or location ID.
* Required field

Full request example

{ "appointments": [ { "appointment": { "id": "apt-12345", "status": "booked", "start_time": "03/10/2026 14:30", "start_date": "03/10/2026", "created_time": "03/01/2026 09:00", "duration": "30", "type": "Follow-up", "reason": "Post-surgery check", "notes": "" }, "patient": { "id": "pat-67890", "first_name": "Jane", "middle_name": "Marie", "last_name": "Doe", "birth_date": "05/15/1990", "gender": "Female", "phone": "555-123-4567", "email": "jane.doe@example.com" }, "practitioner": { "id": "prov-111", "first_name": "John", "last_name": "Smith" }, "location": { "name": "Main Clinic" }, "encounter": { "id": "enc-999", "reason": "Post-surgery follow-up" }, "department_id": "dept-01" } ] }

Success response

{ "message": "Appointments synced successfully", "success": true, "code": 200 }

When to call this API

  • A new appointment is created in your EHR.
  • An existing appointment is updated (rescheduled, status changed).
  • An appointment is cancelled or marked as no-show.
  • You may batch multiple appointments in a single request.
Last updated on