> ## Documentation Index
> Fetch the complete documentation index at: https://developers.docistra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Event types

> Every webhook Docistra sends.

| Event | When | `data.object` | `data.previous` |
| - | - | - | - |
| `patient.created` | A patient file is created in Docistra (the AI agent, a booking, reception, an import) | Patient | |
| `patient.updated` | Name, phone, contact phone, gender, date of birth, age, address, nationality, file number, `external_id`, family holder or relationship changed | Patient | |
| `patient.deleted` | A patient file was deleted | `{ object, id, external_id, deleted: true }` | |
| `appointment.created` | A booking was made, from any channel. `source` says where: `ai_chat`, `booking_page`, `portal`, `staff`, `walk_in`, `wa_link`, `wa_flow`, ... | Appointment | |
| `appointment.rescheduled` | The time, doctor or branch changed | Appointment | `previous_start`, `previous_end`, `previous_doctor_id`, `previous_branch_id` |
| `appointment.cancelled` | The booking was cancelled | Appointment | `previous_status` |
| `appointment.status_changed` | Any other status change: `arrived`, `in_progress`, `completed`, `no_show`, back to `reserved` | Appointment | `previous_status` |
| `doctor.day_off` | A doctor's whole day was closed at a branch | Doctor | `date`, `branch_id`, `reason` |
| `doctor.day_on` | A closed day was opened again | Doctor | `date`, `branch_id` |

> [!NOTE]
>
> A reschedule made through Docistra's own "book again" flow can show up as `appointment.cancelled` for the old booking and `appointment.created` for the new one, with `rescheduled_from_id` pointing back.

Demo records and bookings imported from Google Calendar are never sent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.