Skip to main content
The Cancel Appointment endpoint permanently transitions an appointment to the cancelled status. This is the only supported way to cancel a booking — the Update endpoint (PATCH) intentionally does not allow setting status to cancelled. You can optionally send a WhatsApp cancellation notice to the patient and supply a plain-text reason that is stored in the audit log for compliance and reporting purposes.

Request

DELETE https://api.bydoctor.com.br/v1/appointments/{id}
string
required
The UUID of the appointment to cancel.
boolean
default:false
When true, ByDoctor sends a WhatsApp cancellation message to the patient’s registered phone number after the appointment is successfully cancelled.
string
A plain-text description of why the appointment is being cancelled. This value is stored in the audit log and is visible to clinic staff in the dashboard. It is not sent to the patient. Example: "Patient requested reschedule".

Response Fields

string
The UUID of the appointment that was cancelled.
string
Always cancelled on a successful response.
string
The ISO 8601 UTC timestamp at which the cancellation was processed.
Cancellation is permanent — a cancelled appointment cannot be reinstated. If a patient simply did not attend their appointment, use Update Appointment (PATCH /appointments/{id}) with "status": "no_show" instead. This preserves the appointment record in a recoverable state and keeps your reporting accurate.

Example Request

Example Response (200 OK)

Error Responses

400 Bad Request — The id path parameter is not a valid UUID format.
401 Unauthorized — Your API key is missing or invalid.
404 Not Found — No appointment with the given ID exists in your clinic.
422 Unprocessable Entity — The appointment cannot be cancelled because it is already in a terminal state (completed or cancelled).