Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
cal-com-create-booking
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/cal-com-create-booking \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "start_time": "2024-01-15T14:00:00-08:00",
    "name": "John Smith",
    "email": "[email protected]",
    "phone": "+14155551234",
    "notes": "Interested in dental cleaning"
  }'
{
  "booking_id": 123456,
  "uid": "bkg_a1b2c3d4e5f6",
  "start_time": "2024-01-15T14:00:00-08:00",
  "end_time": "2024-01-15T15:00:00-08:00",
  "attendee": {
    "name": "John Smith",
    "email": "[email protected]"
  },
  "status": "confirmed",
  "meeting_url": null
}
Create a new appointment booking through your connected Cal.com calendar. The booking will be added to your calendar and the attendee will receive a confirmation email.

Request Body

start_time
string
required
Appointment start time in ISO 8601 format. Must be an available slot.Example: 2024-01-15T14:00:00-08:00
name
string
required
Attendee’s full name.Example: John Smith
email
string
required
Attendee’s email address for confirmation.Example: [email protected]
phone
string
Attendee’s phone number.Example: +14155551234
notes
string
Additional notes or reason for appointment.Example: Interested in dental cleaning
event_type_id
integer
Cal.com event type ID. Uses default if not specified.
timezone
string
default:"America/Los_Angeles"
Attendee’s timezone.

Response

booking_id
integer
Cal.com booking ID.
uid
string
Unique booking identifier.
start_time
string
Confirmed start time.
end_time
string
Confirmed end time.
meeting_url
string
Video meeting URL (if applicable).
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/cal-com-create-booking \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "start_time": "2024-01-15T14:00:00-08:00",
    "name": "John Smith",
    "email": "[email protected]",
    "phone": "+14155551234",
    "notes": "Interested in dental cleaning"
  }'
{
  "booking_id": 123456,
  "uid": "bkg_a1b2c3d4e5f6",
  "start_time": "2024-01-15T14:00:00-08:00",
  "end_time": "2024-01-15T15:00:00-08:00",
  "attendee": {
    "name": "John Smith",
    "email": "[email protected]"
  },
  "status": "confirmed",
  "meeting_url": null
}

AI Agent Booking Flow

Your AI agent can book appointments automatically during calls:
Agent: "I have 2pm available on Monday. Should I book that for you?"
Caller: "Yes, please"
Agent: "Great! What's your email address so I can send you a confirmation?"
Caller: "[email protected]"
Agent: "Perfect. I've booked your appointment for Monday at 2pm.
        You'll receive a confirmation email at [email protected].
        Is there anything else I can help you with?"