DEV Community

Alex Spinov
Alex Spinov

Posted on

Cal.com Has a Free API: Open-Source Scheduling That Replaces Calendly

What is Cal.com?

Cal.com is an open-source scheduling platform — the Calendly alternative you can self-host. It handles booking pages, team scheduling, payments, and integrations with a full REST API.

Quick Start

git clone https://github.com/calcom/cal.com
cd cal.com
npm install
npx prisma migrate deploy
npm run dev
Enter fullscreen mode Exit fullscreen mode

The REST API (v2)

export CAL_URL="https://api.cal.com/v2"
export CAL_KEY="your-api-key"
Enter fullscreen mode Exit fullscreen mode

Event Types

# List event types
curl -s "$CAL_URL/event-types" \
  -H "Authorization: Bearer $CAL_KEY" | jq '.data[] | {title, slug, length}'

# Create event type
curl -X POST "$CAL_URL/event-types" \
  -H "Authorization: Bearer $CAL_KEY" \
  -d '{
    "title": "30 Min Meeting",
    "slug": "30min",
    "length": 30,
    "description": "Quick sync call"
  }'
Enter fullscreen mode Exit fullscreen mode

Bookings

# List bookings
curl -s "$CAL_URL/bookings" \
  -H "Authorization: Bearer $CAL_KEY" | jq '.data[] | {title, start, status}'

# Create booking
curl -X POST "$CAL_URL/bookings" \
  -H "Authorization: Bearer $CAL_KEY" \
  -d '{
    "eventTypeId": 123,
    "start": "2026-04-01T10:00:00Z",
    "responses": {
      "name": "John Doe",
      "email": "john@example.com"
    }
  }'

# Cancel booking
curl -X DELETE "$CAL_URL/bookings/BOOKING_ID" \
  -H "Authorization: Bearer $CAL_KEY"
Enter fullscreen mode Exit fullscreen mode

Availability

# Get available slots
curl -s "$CAL_URL/slots/available?eventTypeId=123&startTime=2026-04-01&endTime=2026-04-07" \
  -H "Authorization: Bearer $CAL_KEY"

# Set availability
curl -X POST "$CAL_URL/schedules" \
  -H "Authorization: Bearer $CAL_KEY" \
  -d '{
    "name": "Working Hours",
    "timeZone": "America/New_York",
    "availability": [
      {"days": [1,2,3,4,5], "startTime": "09:00", "endTime": "17:00"}
    ]
  }'
Enter fullscreen mode Exit fullscreen mode

Webhooks

curl -X POST "$CAL_URL/webhooks" \
  -H "Authorization: Bearer $CAL_KEY" \
  -d '{
    "subscriberUrl": "https://myapp.com/webhooks/cal",
    "eventTriggers": ["BOOKING_CREATED", "BOOKING_CANCELLED"],
    "active": true
  }'
Enter fullscreen mode Exit fullscreen mode

Embed in Your App

<!-- Inline embed -->
<cal-inline calLink="username/30min"></cal-inline>
<script src="https://app.cal.com/embed/embed.js"></script>

<!-- Or popup -->
<button data-cal-link="username/30min">Book a call</button>
Enter fullscreen mode Exit fullscreen mode

Features

  • Booking pages: Customizable public pages
  • Team scheduling: Round-robin, collective, managed events
  • Payments: Stripe integration for paid bookings
  • Workflows: Automated emails/SMS reminders
  • Calendar sync: Google, Outlook, Apple Calendar
  • Embeds: Inline, popup, or floating button

Cal.com vs Calendly

Feature Cal.com Calendly
Open source Yes No
Self-host Yes No
Free events Unlimited 1
Team scheduling Free $16/user/mo
API Full REST REST
Custom branding Free Paid
Payments Stripe (free) Stripe (paid plan)

Need scheduling integration or booking automation?

📧 spinov001@gmail.com
🔧 My tools on Apify Store

Calendly or Cal.com? What scheduling tool do you use?

Top comments (0)