# ByDoctor ## Docs - [Cancel an Existing Appointment — DELETE /appointments/{id}](https://docs.bydoctor.com.br/api-reference/appointments/cancel.md): Permanently cancel an appointment by its UUID. Optionally send the patient a WhatsApp cancellation notice and log a reason for audit purposes. - [Create a New Patient Appointment — POST /appointments](https://docs.bydoctor.com.br/api-reference/appointments/create.md): Book a new appointment for a patient with a professional at your clinic. Optionally send the patient a WhatsApp confirmation on creation. - [Fetch a Single Appointment — GET /appointments/{id}](https://docs.bydoctor.com.br/api-reference/appointments/get.md): Retrieve a single appointment by its UUID, including its current status, payment details, and video link for teleconsulta appointments. - [Retrieve All Clinic Appointments — GET /appointments](https://docs.bydoctor.com.br/api-reference/appointments/list.md): Retrieve a cursor-paginated list of appointments for your clinic. Filter by date range, status, professional, patient, or appointment type. - [Update an Existing Appointment — PATCH /appointments/{id}](https://docs.bydoctor.com.br/api-reference/appointments/update.md): Partially update an existing appointment's time, status, or notes. Optionally notify the patient via WhatsApp when changes are saved. - [Create a Patient Record — POST /patients | ByDoctor API](https://docs.bydoctor.com.br/api-reference/patients/create.md): Register a new patient in your clinic. Only the patient's name is required — all other fields can be added later via the Update Patient endpoint. - [Get Patient by ID — GET /patients/{id} | ByDoctor API](https://docs.bydoctor.com.br/api-reference/patients/get.md): Retrieve a single patient record by UUID. Returns all stored contact details, health plan, WhatsApp consent status, and record timestamps. - [List Patients Endpoint — GET /patients | ByDoctor API](https://docs.bydoctor.com.br/api-reference/patients/list.md): Retrieve a paginated list of patients for your clinic. Search by name, CPF, or phone, and filter by health plan or registration date. - [Update Patient — PATCH /patients/{id} | ByDoctor API](https://docs.bydoctor.com.br/api-reference/patients/update.md): Partially update a patient record. Send only the fields you want to change — omitted fields are left untouched. Returns the full updated patient object. - [Record a Payment — POST /payments | ByDoctor API Reference](https://docs.bydoctor.com.br/api-reference/payments/create.md): Record a payment for an appointment in centavos. Supports cash, credit card, debit card, PIX, and health plan payment methods for your clinic. - [List Payments — GET /payments | ByDoctor API Reference](https://docs.bydoctor.com.br/api-reference/payments/list.md): GET /payments — retrieve a paginated list of payments. Filter by appointment, status, method, or date range for financial reporting. - [Check Appointment Availability — GET /schedules/availability](https://docs.bydoctor.com.br/api-reference/schedules/availability.md): Fetch real-time open appointment slots for a professional on a specific date. Accounts for existing bookings, blocked time, and holidays. - [List Professional Schedules — GET /schedules | ByDoctor](https://docs.bydoctor.com.br/api-reference/schedules/list.md): List all professionals and their configured weekly working hours. Filter by professional ID and paginate with cursor-based pagination. - [Register a Webhook Endpoint — POST /webhooks | ByDoctor](https://docs.bydoctor.com.br/api-reference/webhooks/create.md): Register a new HTTPS endpoint to receive ByDoctor events. Returns a one-time signing secret — store it immediately, it won't be shown again. - [Delete a Webhook Endpoint — DELETE /webhooks/{id} | ByDoctor](https://docs.bydoctor.com.br/api-reference/webhooks/delete.md): Permanently remove a webhook endpoint. Event delivery stops immediately and any queued retries are cancelled. This action cannot be undone. - [List Webhook Endpoints — GET /webhooks | ByDoctor API](https://docs.bydoctor.com.br/api-reference/webhooks/list.md): Retrieve all registered webhook endpoints for your clinic, including subscribed event types and active status. The signing secret is never returned. - [ByDoctor API Authentication: Keys, Scopes, and Rotation](https://docs.bydoctor.com.br/authentication.md): Learn how to generate a ByDoctor API key, pass it in your requests using the Authorization header, and manage key scopes and rotation. - [ByDoctor API Data Model and Resource Relationships](https://docs.bydoctor.com.br/concepts/data-model.md): Explore the core entities of the ByDoctor API — Clinics, Professionals, Patients, Appointments, Payments, and Webhooks — and how they relate. - [Handle ByDoctor API Errors, Status Codes, and Retries](https://docs.bydoctor.com.br/concepts/errors.md): Understand the ByDoctor API error format, HTTP status codes, common error codes, and best practices for retries and validation error handling. - [ByDoctor API Pagination: Cursors, Filters, and Sorting](https://docs.bydoctor.com.br/concepts/pagination.md): Learn how cursor-based pagination works across all ByDoctor list endpoints, including query parameters, response envelopes, and filtering options. - [Pull Financial Data and Reports via the ByDoctor API](https://docs.bydoctor.com.br/guides/financial-reporting.md): Use the Payments API and webhooks to build financial dashboards, automate accounting exports, reconcile health plan payments, and track revenue by payment method. - [Sync Patient Records Between ByDoctor and Your CRM](https://docs.bydoctor.com.br/guides/patient-sync.md): Keep patient data consistent between ByDoctor and external CRMs, EHRs, or databases using the Patients API, deduplication by CPF or phone, and webhook events. - [Sync Appointments Between ByDoctor and External Systems](https://docs.bydoctor.com.br/guides/scheduling-integration.md): Integrate ByDoctor scheduling with external calendars or booking platforms to avoid double-booking and display real-time availability. - [Trigger WhatsApp Notifications via ByDoctor Events](https://docs.bydoctor.com.br/guides/whatsapp-notifications.md): Learn how appointment lifecycle events automatically send WhatsApp messages to patients, and how to control notification behavior via the API. - [ByDoctor API: Integrate Clinic Management Workflows](https://docs.bydoctor.com.br/introduction.md): Use the ByDoctor REST API and webhooks to integrate appointment scheduling, patient records, payments, and WhatsApp notifications into your applications. - [ByDoctor API Quickstart: Your First API Calls in Minutes](https://docs.bydoctor.com.br/quickstart.md): Create a ByDoctor account, generate an API key, and make your first live API calls — listing appointments, creating a booking, and setting up a webhook. - [Complete ByDoctor Webhook Event Types and Payload Schemas](https://docs.bydoctor.com.br/webhooks/events.md): Reference for all ByDoctor webhook event types — what triggers each one, the full JSON payload structure, and key fields in the data object. - [Receive Real-Time Clinic Events with ByDoctor Webhooks](https://docs.bydoctor.com.br/webhooks/overview.md): Learn how ByDoctor webhooks push real-time event notifications directly to your server so you can react instantly without polling the API. - [ByDoctor Webhook Delivery Retries and Failure Handling](https://docs.bydoctor.com.br/webhooks/retries.md): Understand how ByDoctor retries failed webhook deliveries, how to handle idempotency, and best practices for building a resilient webhook endpoint. - [Verify ByDoctor Webhook Signatures to Secure Your Endpoint](https://docs.bydoctor.com.br/webhooks/security.md): Use HMAC-SHA256 signature verification to confirm every webhook delivery is genuinely from ByDoctor and has not been tampered with in transit.