Menu

Booking Calls from a Chatbot with Cal.com API v2 – Open Slots, Create, Cancel
📰

Booking Calls from a Chatbot with Cal.com API v2 – Open Slots, Create, Cancel

DEV Community: javascript·the bomber·about 10 hours ago
#LEF4D2wp
#devtojavascript#devto#dev#const#chatbot
Reading 0:00
15s threshold

Booking Calls from a Chatbot with Cal.com API v2 – Open Slots, Create, Cancel

I built a tiny automation server at home that lets the chatbot on my Dream Futures Tech website schedule, confirm, and cancel phone calls on the fly. The whole flow runs on a Node.js micro‑service that talks to Cal.com’s v2 API. Below is the step‑by‑step code I use, plus a few practical tips for anyone who wants to replicate it for their own small‑business site.

1. Why Cal.com?

Self‑hosted – I can run the scheduler on my own server, keeping data under my control.

Simple REST API – v2 exposes endpoints for availability, bookings, and cancellations without needing a heavy SDK.

Free tier – Enough for a handful of daily appointments, which is perfect for a solo‑owner business.

2. Setting up the API client

I keep the client thin: a small wrapper around fetch that injects the API key and handles JSON conversion.

// apiClient.js – tiny wrapper for Cal.com v2 const BASE_URL = " https://api.cal.com/v2 " ; const API_KEY = process .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.