> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nevatal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Appointment

> Cancel a scheduled appointment

## Path Parameters

<ParamField path="id" type="string" required>The appointment ID</ParamField>

## Body Parameters

<ParamField body="reason" type="string">Cancellation reason</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.nevatal.com/api/v1/appointments/apt_xyz789/cancel" \
    -H "Authorization: Bearer nvtl_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{ "reason": "Patient requested reschedule" }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "apt_xyz789",
    "status": "canceled",
    "canceledAt": "2025-03-21T08:30:00Z",
    "cancelReason": "Patient requested reschedule"
  }
  ```

  ```json 422 theme={null}
  {
    "statusCode": 422,
    "error": "Unprocessable Entity",
    "message": "Cannot cancel a completed appointment"
  }
  ```
</ResponseExample>
