{
  "id": 15601877,
  "title": "Adding Call Booking to My Site Chatbot Using the Cal.com API v2",
  "url": "https://urgent.news/2026/10/19/adding-call-booking-to-my-site-chatbot-using-the-cal-com-api-v2",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-19T12:19:09.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/the_bomber_f1e42beb1feaec/adding-call-booking-to-my-site-chatbot-using-the-calcom-api-v2-i69"
  },
  "original_language": "en",
  "account": "Kaleb is a web developer from Pompano Beach, Florida. He runs a business called Dream Futures Tech. On his website, he uses a custom chatbot to handle initial questions from prospective leads. The chatbot was initially only able to answer text queries or direct users to email him. Kaleb wanted visitors to be able to check his availability, book a discovery call within the chat window, and cancel bookings if needed, without leaving the page.\n\nTo achieve this, Kaleb integrated the Cal.com API v2 into his backend services running on his home automation server. He kept users inside the conversational flow instead of redirecting them to an external scheduling link, which he believed improved completion rates.\n\nTo set up authentication and event types, Kaleb obtained an API key from his Cal.com account and the target event type ID. He stored these values in environment variables and included them in his API requests. The v2 API uses Bearer token authentication, and the cal-api-version header must be included to avoid failures or warnings.\n\nWhen a visitor asks about availability, the chatbot triggers a function to fetch open slots for the upcoming week. The v2 slots endpoint requires a start and end time in ISO format. The function fetches the available slots and returns an array of slot times for the chat UI to display as clickable buttons. Once a user selects a time slot and provides their name and email, the bot sends a POST request to create the booking.\n\nUpon a successful response, the booking UID returned by the API is saved in the active chat session state. This UID allows the user to access their booking details if they need to make changes. If a user needs to cancel their scheduled call, the chatbot can cancel the booking by providing the booking UID or checking the active session memory. The cancellation endpoint is called with the booking UID and a cancellation reason, and the bot confirms the cancellation status.",
  "summary": "I am Kaleb, a web developer running Dream Futures Tech here in Pompano Beach, Florida. On my own business website, I run a custom chatbot to handle initial questions from prospective leads. For a long time, the bot only answered text queries or told people to email me. That felt like a bottleneck. I wanted visitors to be able to check my availability, book a discovery call right inside the chat…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}