API reference
Patient lifecycle
Enroll, update and cancel patients.
Enroll, update or cancel patients from your system of record. Use the REST route, or the webhook-compatible route if your platform can only send webhooks.
Every endpoint on this page
patient.created needs the patient's email and enrolls them into the active protocol named by programKey (or protocolId). With neither, it uses the environment's active protocol, only when exactly one is active. The external patient ID is stored only as a keyed hash.
Responses
| Status | Meaning |
|---|---|
202 | Event accepted or an identical retry recognized. |
400 | The request is malformed or violates the operation contract. |
401 | The API credential is missing, invalid, expired, or revoked. |
403 | The organization hasn't signed its BAA, so patient features (and API keys) are off. An owner or administrator signs it in Settings; it takes effect at once. |
404 | The resource is not accessible in this credential's environment. |
409 | The idempotency identifier was reused with different content, or an update is out of sequence. |
202 body
| Field | Type | Description |
|---|---|---|
acceptedRequired | boolean | Always true. |
duplicateRequired | boolean |
{
"code": "INVALID_API_CREDENTIAL",
"message": "API credential is invalid."
}{
"code": "BAA_REQUIRED",
"message": "Sign your BAA to turn on patient features. An owner or administrator can sign it in Settings."
}Submit a patient lifecycle event
POST/
API key. Authorization: Bearer nzh_sb_… in sandbox, nzh_prod_… in production: Authentication.
Request body
| Field | Type | Description |
|---|---|---|
eventIdRequired | string (uuid) | |
typeRequired | string | One of patient.created, patient.updated, patient.cancelled. |
externalPatientIdRequired | string | 1–200 characters. |
firstName | string | 1–80 characters. |
lastName | string | 1–80 characters. |
dateOfBirth | string (date) | |
phone | string | 7–30 characters. |
email | string (email) | Required for patient.created: check-ins are sent by email.Up to 254 characters. |
protocolId | string (uuid) | Send this or programKey, not both. |
programKey | string | The protocol's program key, e.g. glp1-maintenance: the stable way to choose a protocol, set in Workforce → Protocols.Matches ^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$. |
checkInCadenceDays | integer | 1 to 30. |
curl "https://api.nezercare.com/client/patient-events" \
--request POST \
--header "Authorization: Bearer $NEZER_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"eventId": "6987074c-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
}'{
"eventId": "4a3b3472-70fd-48d8-a36b-d95173eac9c2",
"type": "patient.updated",
"externalPatientId": "patient_12345",
"email": "new-address@example.com"
}{
"eventId": "61594921-0f40-4a0d-91ec-88517503485f",
"type": "patient.cancelled",
"externalPatientId": "patient_12345"
}Submit a patient lifecycle event through the webhook-compatible route
POST/
API key. Authorization: Bearer nzh_sb_… in sandbox, nzh_prod_… in production: Authentication.
Request body
| Field | Type | Description |
|---|---|---|
eventIdRequired | string (uuid) | |
typeRequired | string | One of patient.created, patient.updated, patient.cancelled. |
externalPatientIdRequired | string | 1–200 characters. |
firstName | string | 1–80 characters. |
lastName | string | 1–80 characters. |
dateOfBirth | string (date) | |
phone | string | 7–30 characters. |
email | string (email) | Required for patient.created: check-ins are sent by email.Up to 254 characters. |
protocolId | string (uuid) | Send this or programKey, not both. |
programKey | string | The protocol's program key, e.g. glp1-maintenance: the stable way to choose a protocol, set in Workforce → Protocols.Matches ^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$. |
checkInCadenceDays | integer | 1 to 30. |
curl "https://api.nezercare.com/client/webhooks/patient-events" \
--request POST \
--header "Authorization: Bearer $NEZER_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"eventId": "6987074c-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
}'{
"eventId": "4a3b3472-70fd-48d8-a36b-d95173eac9c2",
"type": "patient.updated",
"externalPatientId": "patient_12345",
"email": "new-address@example.com"
}{
"eventId": "61594921-0f40-4a0d-91ec-88517503485f",
"type": "patient.cancelled",
"externalPatientId": "patient_12345"
}