Skip to content

Guides

Enroll and maintain patients

Your system stays the system of record. NezerCare follows a patient only while their check-in pathway is active, keyed to an ID you already use.

Before you start

  • A sandbox API key from the dashboard's Integrations page.
  • An externalPatientId your system already uses. NezerCare stores it only as a keyed hash.
  • The patient's email. Check-ins are sent by email, so enrollment needs one.
  • The protocol's program key, such as glp1-maintenance, set in the dashboard under Protocols. You can leave it out only while exactly one protocol is active.

Every event needs an eventId you generate

Retrying with the same eventId and an identical body is safe and returns the original result. Reusing it with a different body returns 409. That's what makes a retry after a timeout safe: the patient is never enrolled twice.

Enroll a patient

Post a patient.created event to /client/patient-events. The same endpoint takes updates and cancellations; only type changes.

cURL
curl "https://api.nezercare.com/client/patient-events" \
  --request POST \
  --header "Authorization: Bearer $NEZER_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "eventId": "6987014c-f976-4b17-817d-a0f17dc3a6da",
    "type": "patient.created",
    "externalPatientId": "patient_12345",
    "firstName": "Taylor",
    "lastName": "Example",
    "email": "taylor@example.com",
    "dateOfBirth": "1990-06-15",
    "programKey": "glp1-maintenance",
    "checkInCadenceDays": 7
  }'

The response is 202 with accepted: true. Replay the exact same request and you get duplicate: true instead of a second enrollment.

If your platform can only send webhooks, post the same body to /client/webhooks/patient-events. It behaves the same way.

Update or cancel

Send the same shape with a different type:

TypeEffect
patient.createdEnrolls the patient into the active protocol with that programKey (or protocolId). Needs email.
patient.updatedChanges the profile fields you send. Fields you leave out stay as they are.
patient.cancelledStops the patient's active pathway. No more check-ins are scheduled.

Every field and its limits are in the patient lifecycle reference.

Next: the widget

Patients use NezerCare through the widget on your website. To recognize a patient who is already logged in on your site, your backend signs a short identity token with the same externalPatientId. See Sign patients in.