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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Cancel booking

> Cancels a booking, recurrence, or seated attendee.

`calcom.cancelBooking` cancels a booking, recurrence, or seated attendee.

```ts automations/cancel-booking.automation.ts theme={null}
import { automation, markSignificant } from "automate.ax"
import { calcom } from "automate.ax/calcom"

export default automation("Cancel booking", () => {
  markSignificant(
    calcom.cancelBooking({
      bookingUid: "booking-uid",
      cancellationReason: "Customer request",
    }),
  )
})
```

## Input

Pass these fields:

| Field                      | Type      | Required | Description                                                                                                                                              |
| -------------------------- | --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bookingUid`               | `string`  | Yes      | —                                                                                                                                                        |
| `cancellationReason`       | `string`  | No       | —                                                                                                                                                        |
| `cancelSubsequentBookings` | `boolean` | No       | For recurring non-seated booking only - if true, cancel booking with the bookingUid of the individual recurrence and all recurrences that come after it. |

For a seated booking, pass the required `seatUid` with an optional `cancellationReason`. Regular bookings accept `cancellationReason` and `cancelSubsequentBookings`.

## Output

The action removes the outer Cal.com status envelope. Its result is one of these data variants:

| Variant                  | Result                                                   |
| ------------------------ | -------------------------------------------------------- |
| Regular booking          | One booking object.                                      |
| Recurring booking        | One recurring booking object or an array of them.        |
| Seated booking           | One seated booking object.                               |
| Recurring seated booking | One recurring seated booking object or an array of them. |

Cal.com enforces account role, plan, and availability requirements. Provider rejections surface as structured action failures with the HTTP status and any `Retry-After` delay.
