Skip to main content
WEBHOOK

When it’s sent

  • A new patient is added.
The request type is NEW_PATIENT. See the introduction to subscribe to this event and verify the X-Hub-Signature-256 signature.
phone is the full number with the country code, and mobile is the number without it. Linked records such as insurance_company_data are sent as an empty object {} when not set.

Headers

X-Hub-Signature-256
string

HMAC SHA-256 of the raw request body, keyed with your Verify Token, as sha256=<hex>. Sent only when a Verify Token is set.

Example:

"sha256=3f1c5e…"

Body

application/json

Sent when a patient is created.

version
enum<string>
required

Payload version.

Available options:
v1.0
Example:

"v1.0"

type
enum<string>
required

Event type.

Available options:
NEW_PATIENT
Example:

"NEW_PATIENT"

id
string

Patient ID.

Example:

"ckx1p0000001"

name
string

First and last name.

Example:

"Sara Ahmed"

file_no
string | null

Patient file number.

Example:

"P-00017"

reference_no
number | null

Patient reference number.

Example:

1017

nationalId
string | null

National ID.

Example:

"1098765432"

details
string | null

Notes about the patient.

Example:

"Prefers morning appointments"

phone
string | null

Full phone number (country code + number).

Example:

"+966501234567"

mobile
string | null

Phone number without the country code.

Example:

"501234567"

country
string | null

Country.

Example:

"SA"

address
string | null

Address.

Example:

"King Fahd Road, Riyadh"

email
string | null

Email address.

Example:

"patient@example.com"

gender
string | null

Gender.

Example:

"female"

birthDate
string<date-time> | null

Date of birth.

Example:

"1990-05-14T00:00:00.000Z"

branch_data
object

Branch the patient belongs to.

Example:
insurance_company_data
object

Insurance company.

Example:
insurance_policy_data
object

Insurance policy. name is the policy holder name.

Example:
policy_class_data
object

Insurance policy class.

Example:
referral_data
object

Referral source (how the patient heard about the clinic).

Example:

Response

200

Return any 2xx status within 5 seconds to acknowledge the event. Failed deliveries are not retried.