# Create Booking — Cal.com

> Create a new booking. See the documentation

- Key: `cal_com-create-booking`
- Type: Action (Write)
- Version: 1.0.1
- App: Cal.com (`cal_com`) — https://pipedream.com/apps/cal-com.md
- This page (HTML): https://pipedream.com/apps/cal-com/actions/create-booking
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/cal_com/actions/create-booking/create-booking.mjs

## Description

Create a new booking. [See the documentation](https://cal.com/docs/api-reference/v2/bookings/create-a-booking)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `bookingType` | `string` | Yes | Type of booking to create. Use booking for a standard booking, instant for an instant team booking, or recurring to create multiple occurrences. |
| `attendeeName` | `string` | Yes | Full name of the attendee. |
| `attendeeEmail` | `string` | No | Email address of the attendee. Required unless Attendee Phone Number is provided. |
| `attendeeTimeZone` | `string` | Yes | Time zone of the attendee, e.g. America/New_York. |
| `attendeeLanguage` | `string` | No | Language for the booking confirmation. |
| `attendeePhoneNumber` | `string` | No | Phone number in international format, e.g. +919876543210. Can be used instead of Attendee Email as the contact method. Required when the event type has SMS reminders enabled. |
| `eventTypeId` | `integer` | No | The identifier of the event type Options are loaded from the connected account. |
| `eventTypeSlug` | `string` | No | Slug of the event type. Use with Username or Team Slug as an alternative to Event Type ID. |
| `username` | `string` | No | Username of the individual event owner. Required when using Event Type Slug for a personal event type. |
| `teamSlug` | `string` | No | Team slug. Required when using Event Type Slug for a team event type. |
| `organizationSlug` | `string` | No | Organization slug. Optional when using slug-based event type identification. |
| `start` | `string` | Yes | Booking start time in ISO 8601 UTC format, e.g. 2024-08-13T09:00:00Z. |
| `endTime` | `string` | No | Booking end time in ISO 8601 format. Optional — Cal.com derives end time from event type duration by default. |
| `lengthInMinutes` | `integer` | No | Override the event type's default duration in minutes. |
| `guests` | `string[]` | No | Additional guest email addresses to invite. |
| `location` | `string` | No | Meeting location type. attendeeAddress requires Address, attendeeDefined requires Location, attendeePhone requires Phone Number, and integration requires Integration. |
| `locationAddress` | `string` | No | Used only if Location Type is attendeeAddress. Physical address provided by the attendee. |
| `locationValue` | `string` | No | Used only if Location Type is attendeeDefined. Location string defined by the attendee. |
| `locationPhone` | `string` | No | Used only if Location Type is attendeePhone. Phone number in international format, e.g. +919876543210. |
| `locationIntegration` | `string` | No | Used only if Location Type is integration. Video conferencing integration to use for this booking. |
| `recurrenceCount` | `integer` | No | Used only if Booking Type is recurring. Number of occurrences. Cannot exceed the event type's maximum recurrence count. |
| `metadata` | `object` | No | Custom key-value metadata, e.g. { "source": "website", "campaignId": "abc-123" }. Max 50 keys; key names ≤ 40 chars, values ≤ 500 chars. |
| `bookingFieldsResponses` | `object` | No | Responses to custom booking form fields keyed by field slug, e.g. { "company-name": "Acme Inc", "team-size": "10-50" }. |
| `allowConflicts` | `boolean` | No | Bypass availability checks and allow double-booking. Host use only. |
| `allowBookingOutOfBounds` | `boolean` | No | Allow booking outside the event type's scheduling window. Host use only. |
| `emailVerificationCode` | `string` | No | Required when the event type has email verification enabled. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "cal_com",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "cal_com-create-booking",
  arguments: {
    bookingType: "Booking Type",
    attendeeName: "Attendee Name",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "cal_com-create-booking",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    cal_com: { authProvisionId: "apn_xxxxxxx" },
    bookingType: "Booking Type",
    attendeeName: "Attendee Name",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "cal_com-create-booking",
    "configured_props": {
      "cal_com": { "authProvisionId": "apn_xxxxxxx" },
      "bookingType": "Booking Type",
      "attendeeName": "Attendee Name"
    }
  }'
```

---

- App: https://pipedream.com/apps/cal-com.md · All apps: https://pipedream.com/apps
