> ## 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.

# Update private link

> Updates a private scheduling link.

`calcom.updatePrivateLink` updates a private scheduling link.

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

export default automation("Update private link", () => {
  markSignificant(
    calcom.updatePrivateLink({
      eventTypeId: 23,
      linkId: "abc123def456",
      maxUsageCount: 20,
    }),
  )
})
```

## Input

| Field           | Type                 | Required | Description                                |
| --------------- | -------------------- | -------- | ------------------------------------------ |
| `eventTypeId`   | `integer`            | Yes      | Event type that owns the link.             |
| `linkId`        | `string`             | Yes      | Link ID from create or list.               |
| `expiresAt`     | `string (date-time)` | No       | New expiration for a time-based link.      |
| `maxUsageCount` | `number`             | No       | New usage cap; pass `-1` for no count cap. |

## Output

Returns one of two link variants. Both include required `linkId: string`, `eventTypeId: number`, `isExpired: boolean`, and `bookingUrl: string`. A time-based link also has required `expiresAt: string`; a usage-based link instead has required `maxUsageCount: number` and `usageCount: number`.

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.
