Skip to main content
Every webhook delivery from ByDoctor shares the same outer envelope, regardless of the event type. The data field is the only part that varies — it contains the full resource object as it existed at the moment the event fired. Understanding the envelope first makes it easy to handle any event type with a single dispatcher.

Event Envelope

All webhook payloads follow this top-level structure:

Appointment Events

Appointment events fire when the lifecycle state of a scheduled appointment changes. They cover everything from initial booking through completion or no-show.

Patient Events

Patient events fire when a patient record is created or updated in the clinic’s directory.

Payment Events

Payment events track the financial lifecycle of charges associated with appointments or services.
Monetary amounts are always expressed in cents (e.g., 25000 = R$ 250,00) to avoid floating-point precision issues. The currency field is always BRL for Brazilian Real.

Teleconsultation Events

Teleconsultation events fire at the boundaries of a video consultation session — when the session becomes active and when it ends.
Listen for teleconsultation.ended to automatically trigger post-consultation workflows such as sending a follow-up message to the patient, generating a prescription form, or releasing the payment charge.