Skip to main content
This guide explains how to build AI agents that interact with Cal.com’s scheduling infrastructure. For agents that can execute commands on a machine, use the official Cal.com CLI instead of calling the API directly. The CLI handles authentication, versioning, and common workflows automatically.
The CLI includes --help flags on all commands to learn about available options:
Only fall back to the API approach below if your agent cannot install or execute the CLI on its machine.

Overview

Cal.com API v2 enables AI agents to:
  • Check availability - Query available time slots for any user or team
  • Create bookings - Schedule meetings on behalf of users
  • Manage event types - Create and configure different meeting types
  • Handle rescheduling and cancellations - Modify existing bookings
  • Manage schedules - Set and update user availability
  • Track credit usage - Check balances and charge credits for agent interactions

Authentication

AI agents should authenticate using an API key. Generate one in Settings → Developer → API Keys.
The cal-api-version header is required for all v2 endpoints. If you omit it, requests will return a 404. Always include cal-api-version: 2024-08-13.

Common workflows

1. Check availability

Query available slots using username and event slug—no need to look up IDs first:
Response includes available time slots:

2. Create a booking

Schedule a meeting using username and event slug. This is the most common pattern for AI agents that extract scheduling intent from natural language (e.g., “book 15min with bailey”):
The booking creation endpoint is public and does not require authentication. This allows agents to book on behalf of external users.

3. Handle custom booking questions

Most Cal.com users have required questions on their booking pages (e.g., “What is this meeting about?”). If you omit required fields, the API returns a 400 error. Include responses in bookingFieldsResponses:
To discover which fields are required, fetch the event type details first. The bookingFields array shows all custom questions and their requirements.

4. Instant bookings for urgent requests

For teams handling urgent requests, use the instant flag to bypass normal scheduling and immediately ring available team members:
Instant bookings require the event type to be configured for instant meetings. This is ideal for AI agents routing urgent customer requests.

5. Get user’s event types

Retrieve available event types to offer booking options:

6. Reschedule a booking

Move an existing booking to a new time:

7. Cancel a booking

Credit management

If your AI agent runs on the Cal.com platform, you can track usage by checking and charging credits through the API. This is useful for metering agent interactions against your account’s credit balance.

Check available credits

Before performing a billable action, verify that the user or team has sufficient credits:
Response:
The balance object breaks down your remaining credits:
  • monthlyRemaining — credits included in your current billing cycle
  • additional — purchased credits outside the monthly allowance

Charge credits

After a completed agent interaction, charge the appropriate number of credits:
Response:
Always include an externalRef tied to your agent’s conversation or thread ID. This prevents duplicate charges if a network retry sends the same request twice.

Example: check-then-charge pattern

Best practices for AI agents

Handle time zones correctly

Always specify time zones explicitly. Store user preferences and pass them in requests:

Implement retry logic

API requests may occasionally fail. Implement exponential backoff:

Validate availability before booking

Always check slots before attempting to create a booking to avoid conflicts:

Use webhooks for real-time updates

Configure webhooks to receive notifications when bookings are created, rescheduled, or cancelled:

Discover the API from a booking page

Cal.com web app pages, including personal, team and organization booking pages, send a Link header that points agents to the API:
Discovery documents under /.well-known/ also work on organization domains such as acme.cal.com. They are served as discovery documents, not treated as organization booking pages.

OAuth protected-resource metadata

Each origin serves OAuth protected-resource metadata (RFC 9728) for the page you are on. /.well-known/oauth-protected-resource names the origin itself as the resource. To get metadata for a specific page, add its path after the metadata path:
The response lists the Cal.com OAuth authorization server, the supported scopes and the API documentation. The API keeps its own metadata at https://api.cal.com/.well-known/oauth-protected-resource, which the API catalog links to.

Booking page tools for in-browser agents

Cal.com booking pages register WebMCP tools when the visitor’s browser supports WebMCP (document.modelContext). An agent running in the browser can use them to read the event and pick a time without scraping the page. Each tool returns its result as JSON text.
select_time never creates a booking. The visitor still has to fill in the booking form and confirm. It declines, and asks for the time to be picked on the page, when the event asks the booker to propose several times or when picking a time would book straight away (for example, because every required booking question is already prefilled).

iMessage RSVPs from a linked phone number

When a Cal Event offers Register with iMessage, a guest can RSVP by texting from their phone instead of filling in the form. If the guest’s phone number is linked to a Cal.com account through the Cal.com assistant on iMessage, an RSVP made while signed out of Cal.com is saved to that account, the same as an RSVP made while signed in. It shows on the event page when they sign in. To link a number, message the Cal.com assistant on iMessage, open the link it replies with, and select Connect account while signed in to Cal.com.
If the RSVP is started from the event page while signed in, it’s saved to the signed-in account, even when the phone number is linked to a different account. An RSVP from a number that no account has linked or verified on its profile stays anonymous. A number verified on a profile takes priority over an iMessage link.

Rate limits

API key authentication allows 120 requests per minute by default. Contact support if you need higher limits for production agents.

API reference

For complete endpoint documentation, see the API v2 Reference. Key endpoints for agents: