# POST /visits/close URL: https://developers.vsee.io/api/visit-api/post/visits/close operationId: closeVisit Auth: User Token — Requires a user access token from login or SSO. Close or cancel a visit Close, cancel, or end a visit or appointment Parameters: - X-ApiToken (header, string, required) — API token - X-AccountCode (header, string, required) — Account code - id (query, string, required) — The ID of the visit/appointment - reason (query, string, optional) — Reason for closing. Options: patient_end_call, patient_exit_room, call_ended, patient_cancel_appointment, max_waiting_time_reached Responses: - 200 — Visit closed successfully ```json { "data": { "id": "1525" } } ``` - 401 — Unauthorized ```json { "error": "Unauthorized", "message": "Invalid or missing API token" } ```