What triggers a WhatsApp message
Each stage of the appointment lifecycle maps to a specific notification type:
Reminder messages are sent automatically by ByDoctor’s scheduling engine — you do not need to trigger them manually.
Controlling notifications with notify_patient
When you create an appointment via POST /appointments, the notify_patient flag controls whether ByDoctor sends the booking confirmation immediately.
- Send confirmation (default)
- Suppress confirmation
Set
notify_patient: true (or omit the field — it defaults to true) to send the WhatsApp confirmation as soon as the appointment is created. This is appropriate for any booking made in advance.Checking notification delivery status
After an appointment is created, you can inspect the delivery history of all notifications sent for that appointment usingGET /appointments/{id}/notifications.
status values are:
Patient phone number requirements
WhatsApp notifications are sent to thephone field stored on the patient record. The number must be in E.164 format — a leading +, followed by the country code, area code, and number, with no spaces or punctuation.
To check and update a patient’s phone number:
PATCH /patients/{id}:
Handling opt-outs
Patients can opt out of WhatsApp messages by replying with a stop keyword directly in WhatsApp. Once a patient has opted out, any attempt to send them a notification returns awhatsapp_opt_out error in the notification log:
whatsapp_opt_out error, consider falling back to an SMS or email notification flow in your integration. Do not attempt to re-enroll the patient programmatically — opt-out preferences must be managed by the patient directly.
You can preview the exact message template that will be sent for each notification type directly in the ByDoctor dashboard under Settings → WhatsApp Notifications. Previewing templates before going live is strongly recommended, particularly for clinics with branded language requirements.
Limitations
- Sender number — Messages are sent from the ByDoctor official WhatsApp number. You cannot customise the sender number or use your clinic’s own WhatsApp Business number through this API.
- Template content — Message templates are managed by ByDoctor and approved by Meta. Custom template text is not available via the API.
- Timing — The 24-hour reminder is sent relative to
starts_atin UTC. Confirm that appointment times are stored with the correct UTC offset to avoid reminders arriving at unexpected local times.
The ByDoctor Pro plan includes a monthly WhatsApp message quota. Confirmations, reminders, and cancellation notices each consume one message credit. Check your current usage and quota in the ByDoctor dashboard under Settings → Billing → WhatsApp Usage. Contact support if you expect to exceed your plan limit.