Skip to main content
The Update Appointment endpoint allows you to modify an existing appointment using a partial update (PATCH semantics). You can reschedule by changing starts_at and ends_at, advance the lifecycle status to confirmed, completed, or no_show, or edit internal notes — all in a single request. Every field in the request body is optional; only the fields you include are changed. If you want the patient to receive a WhatsApp notification about the change, include "notify_patient": true in the request body.

Request

PATCH https://api.bydoctor.com.br/v1/appointments/{id} Content-Type: application/json
string
required
The UUID of the appointment to update.
string
New appointment start time as an ISO 8601 UTC timestamp. Must be provided together with ends_at when rescheduling.
string
New appointment end time as an ISO 8601 UTC timestamp. Must be strictly after the new starts_at.
string
Transition the appointment to a new lifecycle status. Accepted values: confirmed, completed, no_show. See the warning below regarding cancelled.
string
Replacement text for the notes field. Pass an empty string "" to clear existing notes.
boolean
default:false
When true, ByDoctor sends a WhatsApp update notification to the patient’s registered phone number after a successful update. Defaults to false so that routine administrative edits do not generate unwanted messages. This field is write-only and is not returned in responses.

Response Fields

string
Unique identifier for the appointment (UUID).
string
The ID of the clinic that owns this appointment.
string
The ID of the patient linked to this appointment.
string
The ID of the professional assigned to this appointment.
string
Current appointment start time in ISO 8601 UTC format (updated if rescheduled).
string
Current appointment end time in ISO 8601 UTC format (updated if rescheduled).
string
Appointment type: presencial or teleconsulta. Cannot be changed after creation.
string
The appointment’s current lifecycle status after the update.
string
The current notes after the update. null if none are set.
string
Current payment status: pending, paid, or overdue.
string
Video room URL. Present only when type is teleconsulta. null otherwise.
string
Timestamp when the appointment was originally created (ISO 8601 UTC).
string
Timestamp of this update (ISO 8601 UTC).
Setting status to cancelled via this endpoint is not permitted and will return a 400 Bad Request error. To cancel an appointment, use the Cancel Appointment endpoint (DELETE /appointments/{id}) instead. This separation ensures cancellations are audited correctly and that the optional WhatsApp cancellation notice is handled by the dedicated workflow.

Example Request — Reschedule an Appointment

Example Response (200 OK)

Error Responses

400 Bad Request — Invalid field value, including an attempt to set status to cancelled.
401 Unauthorized — Your API key is missing or invalid.
404 Not Found — No appointment with the given ID exists in your clinic.
409 Conflict — The new time slot overlaps with another appointment for the same professional.
422 Unprocessable Entity — The request body is structurally valid but logically inconsistent (for example, ends_at is before or equal to starts_at).