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

# Cal.com

> Proxy Cal.com v2 REST API requests through agntdata using your own Cal.com API key.

## Overview

The Cal.com connection proxies requests to the Cal.com v2 REST API at `https://api.cal.com/v2`. Use it to let agents list bookings, check availability, create and cancel bookings, and inspect event types on behalf of a Cal.com user.

* **Base URL**: `https://api.agntdata.dev/v1/connections/calcom/*`
* **Cal.com auth**: agntdata injects `Authorization: Bearer <your_calcom_api_key>`
* **Version header**: agntdata injects the `cal-api-version` value Cal.com requires for each supported endpoint. Booking endpoints default to `2026-02-25`; event types and slots use Cal.com's older endpoint-specific versions. Override per request by sending your own `cal-api-version` header — the proxy forwards it.

## Setup

<Steps>
  <Step title="Generate a Cal.com v2 API key">
    In Cal.com go to **Settings → Developer → API keys** and create a v2 key (`cal_live_...` for production, `cal_test_...` for sandbox). v1 keys are not supported.
  </Step>

  <Step title="Paste it into agntdata">
    In the agntdata dashboard open **Integrations**, pick **Cal.com**, and paste the v2 key.
  </Step>

  <Step title="Call Cal.com">
    Make requests to `https://api.agntdata.dev/v1/connections/calcom/*` with your agntdata API key. agntdata forwards your Cal.com key and injects the Cal.com API version required by the matched endpoint.
  </Step>
</Steps>

## Examples

### Sanity check the connection

```bash theme={null}
curl -X GET "https://api.agntdata.dev/v1/connections/calcom/me" \
  -H "Authorization: Bearer $AGNTDATA_API_KEY"
```

### List upcoming bookings

```bash theme={null}
curl -X GET "https://api.agntdata.dev/v1/connections/calcom/bookings?status=upcoming&take=25" \
  -H "Authorization: Bearer $AGNTDATA_API_KEY"
```

### Query open slots for an event type

```bash theme={null}
curl -X GET "https://api.agntdata.dev/v1/connections/calcom/slots?eventTypeId=12345&start=2026-04-28&end=2026-05-05&timeZone=America/Los_Angeles" \
  -H "Authorization: Bearer $AGNTDATA_API_KEY"
```

### Create a booking

```bash theme={null}
curl -X POST "https://api.agntdata.dev/v1/connections/calcom/bookings" \
  -H "Authorization: Bearer $AGNTDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "eventTypeId": 12345,
    "start": "2026-04-28T17:00:00Z",
    "attendee": {
      "name": "Jenny Rosen",
      "email": "jenny.rosen@example.com",
      "timeZone": "America/Los_Angeles"
    }
  }'
```

## Supported operations

* **Me** — `GET /me` (inspect the API key owner)
* **Bookings** — list, retrieve, create, cancel, reschedule
* **Event Types** — list, retrieve
* **Schedules** — list
* **Slots** — `GET /slots` (open slots for an event type)

## Receiving Cal.com webhooks

This connection covers outbound calls. To receive Cal.com event notifications, mint an agntdata webhook endpoint and configure a Cal.com webhook to POST to that URL.
