# Cancel appointment This endpoint is used to request the cancellation of an appointment in a non-cancelled status. (Non-cancelled statuses include: pending_booking, booking_failed, confirmed, pending_reschedule, reschedule_failed and rescheduled) Developers must send a valid as input in the request body and may choose to pass a cancellation reason using the standardized field. The optional field should only be used when the cancellation reason type is 'other_patient_reason' or 'other_provider_reason' to provide additional context. If the appointment was booked with a Zocdoc user credential, only that user will have access to view or modify the appointment. If the appointment was booked with a machine-to-machine credential, the appointment can be viewed and modified by any of the developer's machine-to-machine credentials. Endpoint: POST /v1/appointments/cancel Version: 1.22 Security: ClientCredentialsFlow, AuthorizationCodeFlow ## Request fields (application/json): - `appointment_id` (string, required) The Zocdoc ID of the appointment. Example: "d04b049a-41b1-4aba-9268-d8973cf72cdd" - `cancellation_reason` (string) Optional free text description for the appointment cancellation. Only use this field when cancellation_reason_type is set to 'other_patient_reason' or 'other_provider_reason'. - `cancellation_reason_type` (string) Enum field describing why the appointment was cancelled. This field is optional but recommended when known for metrics purposes. If the cancellation reason does not match any predefined enum values, use 'other_patient_reason' or 'other_provider_reason' and provide a free text explanation in the cancellation_reason field. Enum: "patient_no_longer_needs_appointment", "patient_no_longer_available", "other_patient_reason", "missing_needed_patient_information", "payment_or_insurance_issue", "patient_or_visit_type_not_accepted", "provider_not_available", "rescheduling_patient", "other_provider_reason" ## Response 200 fields (application/json): - `request_id` (string, required) - `data` (object, required) Data that will be returned upon a sucessful booking request - `data.appointment_id` (string, required) The Zocdoc ID of the appointment. - `data.appointment_status` (string, required) The status of the appointment. See [Appointment Status definitions](/guides/glossary). Enum: "pending_booking", "confirmed", "booking_failed", "cancelled", "no_show", "pending_reschedule", "rescheduled", "reschedule_failed" - `data.developer_patient_id` (string) ## Response 400 fields (application/json): - `request_id` (string, required) - `error_type` (string, required) Enum: "api_error", "invalid_request" - `errors` (array, required) - `errors.field` (string) - `errors.message` (string, required) ## Response 404 fields (application/json): - `request_id` (string, required) - `error_type` (string, required) Enum: "api_error", "invalid_request" - `errors` (array, required) - `errors.field` (string) - `errors.message` (string, required) ## Response 409 fields (application/json): - `request_id` (string, required) - `error_type` (string, required) Enum: "api_error", "invalid_request" - `errors` (array, required) - `errors.field` (string) - `errors.message` (string, required)