Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
cal-com-get-slots
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/cal-com-get-slots \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "date_from": "2024-01-15",
    "date_to": "2024-01-22",
    "timezone": "America/Los_Angeles"
  }'
{
  "slots": {
    "2024-01-15": [
      { "time": "2024-01-15T09:00:00-08:00" },
      { "time": "2024-01-15T10:00:00-08:00" },
      { "time": "2024-01-15T14:00:00-08:00" },
      { "time": "2024-01-15T15:00:00-08:00" }
    ],
    "2024-01-16": [
      { "time": "2024-01-16T09:00:00-08:00" },
      { "time": "2024-01-16T11:00:00-08:00" }
    ],
    "2024-01-17": []
  }
}
Retrieve available time slots for booking appointments through your connected Cal.com calendar integration.

Request Body

date_from
string
required
Start date for availability search (YYYY-MM-DD format).Example: 2024-01-15
date_to
string
required
End date for availability search (YYYY-MM-DD format).Example: 2024-01-22
event_type_id
integer
Cal.com event type ID. If not specified, uses your default event type.
timezone
string
default:"America/Los_Angeles"
Timezone for the returned slots.Example: America/New_York

Response

slots
object
Object with dates as keys, each containing an array of available times.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/cal-com-get-slots \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "date_from": "2024-01-15",
    "date_to": "2024-01-22",
    "timezone": "America/Los_Angeles"
  }'
{
  "slots": {
    "2024-01-15": [
      { "time": "2024-01-15T09:00:00-08:00" },
      { "time": "2024-01-15T10:00:00-08:00" },
      { "time": "2024-01-15T14:00:00-08:00" },
      { "time": "2024-01-15T15:00:00-08:00" }
    ],
    "2024-01-16": [
      { "time": "2024-01-16T09:00:00-08:00" },
      { "time": "2024-01-16T11:00:00-08:00" }
    ],
    "2024-01-17": []
  }
}

AI Agent Integration

Your AI agent can automatically check availability and offer times to callers:
Caller: "I'd like to schedule an appointment"
Agent: "I'd be happy to help you schedule an appointment.
        I have availability this week on Monday at 9am, 10am, 2pm, or 3pm,
        and Tuesday at 9am or 11am. Which time works best for you?"