Skip to content
Docs menu

Appointments

Scheduled patient visits. Bound to a provider, an appointment type, and a contact.

Booking an appointment writes a row, an activity (type: MEETING), and an audit entry. Cancellation flows through the same endpoint with a PATCH.

POST/api/appointmentsBearer token

Book an appointment

Create a new appointment slot. The container service validates conflicts against the provider's availability and overlapping bookings.

Required scopes:contacts.write

Request body

NameTypeDescription
contactIdrequiredstringPatient.
providerIdrequiredstringProvider.
appointmentTypeIdrequiredstringAppointment type.
scheduledAtrequiredstringISO 8601 datetime.
durationMinutesintegerOverride the type's default duration.
reasonstringVisit reason. ≤ 2000 chars.
internalNotesstringStaff-only notes. ≤ 8000 chars.
telehealthUrlstringVideo room URL.
locationstringFree-form location. ≤ 200 chars.

Request body

JSON
{ "contactId": "cln…", "providerId": "prv…", "appointmentTypeId": "at…", "scheduledAt": "2026-05-22T19:00:00Z" }

Responses

  • 201 CreatedBooked.
    example
    {
      "id": "ap_3w8d2k…",
      "contactId": "cln1f8s7p…",
      "providerId": "prv_9k4w2x…",
      "appointmentTypeId": "at_8h2c3p…",
      "scheduledAt": "2026-05-22T19:00:00Z",
      "durationMinutes": 30,
      "status": "BOOKED",
      "location": "Suite 101",
      "telehealthUrl": null,
      "reason": "Annual physical",
      "createdAt": "2026-05-18T14:00:00Z"
    }
  • 409 ConflictProvider double-booked.
  • 422 Unprocessable EntityValidation failed.

Code samples

Shell
curl -X POST https://app.contactfollowup.com/api/appointments \
  -H "Authorization: Bearer $HEARTHNOTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "contactId": "cln…", "providerId": "prv…", "appointmentTypeId": "at…", "scheduledAt": "2026-05-22T19:00:00Z" }'
GET/api/appointmentsBearer token

List appointments

Filter by provider, contact, and a time window.

Required scopes:contacts.read

Query parameters

NameTypeDescription
providerIdstringProvider id.
contactIdstringContact id.
fromstringISO 8601 datetime — start of window.
tostringISO 8601 datetime — end of window.
limitintegerDefault 200.

Responses

  • 200 OKAppointments.
    example
    { "appointments": [{
      "id": "ap_3w8d2k…",
      "contactId": "cln1f8s7p…",
      "providerId": "prv_9k4w2x…",
      "appointmentTypeId": "at_8h2c3p…",
      "scheduledAt": "2026-05-22T19:00:00Z",
      "durationMinutes": 30,
      "status": "BOOKED",
      "location": "Suite 101",
      "telehealthUrl": null,
      "reason": "Annual physical",
      "createdAt": "2026-05-18T14:00:00Z"
    }] }

Code samples

Shell
curl -X GET https://app.contactfollowup.com/api/appointments \
  -H "Authorization: Bearer $HEARTHNOTE_TOKEN" \
  -H "Content-Type: application/json"