https://cal.com logo
Join Slack
Powered by
# api
  • n

    Nicolas D.

    02/08/2023, 11:10 AM
    Hello, it seems i will need to have access to the API for the POC of the plateform i'm trying to develop (marketplace where users can book time with experts). I managed to run the self hosted version of cal.com in test mode (with yarn run dx it was quite straightforward), but it seems there is no access to the api yet. I saw in this channel i should go through the setup guide https://console.cal.com , but i'm stuck at first step šŸ˜• Is there anything else to do before ? (cal username nicolasd)
    p
    z
    a
    • 4
    • 17
  • a

    Andrew McGrath

    02/16/2023, 10:32 PM
    Hey folks, looking for some guidance on what I’m missing. I see reference to a ā€œslotsā€ api, but it doesnt appear to be there in production. Looking to get available timeslots for an integration i’m working on.
  • a

    Ali

    02/17/2023, 12:18 PM
    Hey @Andrew McGrath I believe what you're looking for is availability API. We don't have documentation for it ready just yet, but here's how you can call it:
    Copy code
    GET {{baseUrl}}/availability/apiKey={{your_api_key}}&username=admin&dateFrom=2023-02-01&dateTo=2023-03-01&eventTypeId=2
    
    Allows URL parameters:
    apiKey
    username
    dateFrom
    dateTo
    eventTypeId
    m
    t
    +2
    • 5
    • 6
  • a

    Ali

    02/17/2023, 12:19 PM
    This gets you the response similar to the following:
    Copy code
    {
      "busy": [
        {
          "start": "2023-02-09T04:30:00.000Z",
          "end": "2023-02-09T05:00:00.000Z",
          "title": "30 Min Meeting between Admin and John Doe"
        },
        {
          "start": "2023-02-22T10:15:00.000Z",
          "end": "2023-02-22T10:30:00.000Z",
          "title": "Dynamic Collective 15min Event"
        },
        {
          "start": "2023-02-22T04:30:00.000Z",
          "end": "2023-02-22T04:45:00.000Z",
          "title": "Secret Meeting between Admin and John Doe"
        },
        {
          "start": "2023-02-15T05:30:00.000Z",
          "end": "2023-02-15T06:00:00.000Z",
          "title": "30 Min Meeting between Admin and Testing Caldav"
        }
      ],
      "timeZone": "Asia/Calcutta",
      "workingHours": [
        {
          "days": [
            1,
            2,
            3,
            4,
            5
          ],
          "startTime": 210,
          "endTime": 690,
          "userId": 1
        }
      ],
      "dateOverrides": [],
      "currentSeats": null
    }
    a
    • 2
    • 2
  • a

    Andrew McGrath

    02/18/2023, 2:14 AM
    Is there an API to add a user to a team? I can see one to create a team, and a user, but nothing to add a user to a team.
    z
    • 2
    • 2
  • n

    Nicolas D.

    02/27/2023, 12:30 PM
    Hello, today i can't log in anymore on cal.dev like i used to (last friday it was working) . I'm now redirected to https://vercel.com/login when i want to login (https://app.cal.dev/auth/login). I need to log in to get my staging license key, can you help ?
  • э

    ЭлГар Азаматов

    03/03/2023, 12:04 PM
    Hello, I want to patch booking using cal com api with this route https://api.cal.com/v1/bookings/{id}, I send json request like this {"status":"ACCEPTED"} using Postman, and it's returning me {"message": "Unrecognized key(s) in object: 'status'"} . Can you pls help me this problem <3
    a
    • 2
    • 2
  • k

    Kerry Ritter

    03/07/2023, 7:40 PM
    Is there a way to redirect a user from our platform already logged-in to the Cal.com platform? i.e. an OAuth or otherwise kind of mechanism. I want to send our users to Cal.com to manage their schedule without making them log in twice.
    z
    • 2
    • 4
  • m

    Mr. Raghav Mittal

    03/09/2023, 7:40 AM
    can anyone help me in getting the api sandbox for cal.com
    a
    • 2
    • 1
  • d

    Duncan Colville

    03/10/2023, 11:51 AM
    hello i am getting this error in booking(POST) api, can you please help, it's urgent { "message": "\nInvalid
    prisma.eventType.findUniqueOrThrow()
    invocation:\n\n\nThe column
    Host.id
    does not exist in the current database." }
    • 1
    • 1
  • a

    Alexander Ruban

    03/12/2023, 8:52 PM
    Hi, guys I plan to use CalCom self-hosted (Platform plan). Is there a way to connect created user with an external calendar (like Google), to retrieve booked timeslots from external calendar when retrieving available timeslots for the user?
  • l

    Lehlohonolo Ntsoele

    03/13/2023, 7:34 PM
    Hello there Is there anybody that can... Help debug/resolve a 500 server error? I am receiving a 500 error while creating a booking, with the message "Unhandled error of type 'undefined'..." The booking creation is successful but the server responds with an error. Details of my request: Method: POST URL: https://api.cal.com/v1/bookings/?apiKey=[API_KEY] Body { "title": "Sandra's Booking", "start": "2023-03-16T150000+0200", "end": "2023-03-16T154500+0200", "eventTypeId": 239192, "description": "", "name": "Sandra", "email": "lehlohonolo.ntsoele@hekimacounsel.com", "language": "en", "metadata": {}, "location": "link", "customInputs": [], "timeZone": "Africa/Johannesburg" } Am I doing something wrong? Your help would greatly be appreciated.
    m
    • 2
    • 1
  • m

    Michal Bojtos

    03/14/2023, 3:48 PM
    @Sydney O Hello, I would like to get free time for a meeting. The "https://api.cal.com/v1/slots" api method is giving me a 404. Can I have other options to get free time slots?
    s
    a
    +2
    • 5
    • 5
  • a

    Abhinav kumar

    03/16/2023, 8:17 AM
    hello API is enterprise feature?
    m
    • 2
    • 1
  • f

    Faris Abdul Malik

    03/16/2023, 10:55 AM
    I need to redirect to a payment gateway after clicking confirm on booking page. Do I just directly write it on
    apps/web/components/booking/pages/BookingPage.tsx
  • b

    Ben Weiner

    03/18/2023, 7:55 PM
    i'm subscribed to the Platform plan. i have the web and api running on localhost. i have access to the api submodule which i would like to test. my understanding is that i need a staging deployment in order to do this. so following https://cal.com/docs/how-to-guides/how-to-test-api-in-a-local-instance, if i go to console.cal.dev and then click "Don't have an account?" link on the bottom it takes me to http://localhost:3000/signup which tells me "This is an enterprise feature." if i try to follow the link to
    /auth/setup
    then i get a 404 on localhost. can someone point me to the correct docs to get set up?
    a
    • 2
    • 2
  • t

    Thomas

    03/28/2023, 10:26 AM
    Hi, the docs say this:
    The user endpoints can only be used on self-hosted enterprise instances and not on our hosted platform. Also note that these are ADMIN only API requests.
    I used the /v1/users endpoints on api.cal.com and it turned out to work as expected. If this is intentional, could this be mentioned?
    z
    • 2
    • 5
  • s

    shogo kakinouchi

    03/29/2023, 9:28 AM
    Hello, I’m going to create a web service that allows users to book our counseling service and to see their appointments in the web service. So I want a GET API that returns the appointments associated with specific user by a user email address or something to show the appointments to users. Is there anything like that in cal.com? and can I try it ?
  • a

    Arpit Khemka

    04/04/2023, 7:17 PM
    @Ali — we are looking for an API that can give us the available slots for a user. This way we can show on the UI the following: Today - Zero slots available, tomorrow 4 slots available and next week they have 20 slots available. We are on enterprise plan.
  • a

    Ali

    04/04/2023, 9:06 PM
    Hey @Arpit Khemka I believe @Emrysal is working on it
  • k

    Kate Donaldson

    04/15/2023, 8:02 PM
    I have self-hosted Cal.com; I might be missing something but I'm trying to create a new user and new schedule via the API; when I submit availability data it looks like it's not accepted in the
    POST /schedules
    handler, and instead, that endpoint only accepts
    userId
    ,
    name
    , and
    timeZone
    . The
    DEFAULT_SCHEDULE
    constant is the only option for creating new schedules w/ availability via API. Am I understanding correctly?
  • k

    Kate Donaldson

    04/15/2023, 8:06 PM
    If I want a custom availability, it looks like I have to make a schedule, make the custom availability w/ that schedule ID, then remove the default availability that was created when creating the schedule in the first place
  • k

    Kate Donaldson

    04/15/2023, 8:06 PM
    Is that correct?
  • b

    Ben Weiner

    04/19/2023, 9:50 PM
    is there a way to set
    completedOnboarding
    to true for users created via the api?
    a
    • 2
    • 3
  • h

    HorizonFD Services

    04/28/2023, 9:09 AM
    hi all, I just deployed a google web app to capture webhooks from cal.com. When I ping test the subscriber URL the webhook response passed but when I look at the execution log in google script, it comes up with an entry stating a doPost() function has failed. I would like to use webhooks to try and post booking entries from cal.com to google sheets is there any tutorial on how this can be done? I have to be honest I am a complete beginner when it comes to webhooks but would like to learn. I was using this link as an inspiration https://areatype.com/blog/using-google-sheets-capture-webhook-data
    a
    • 2
    • 2
  • s

    Scott Novich

    04/28/2023, 9:05 PM
    Does the API track events just for the user's personal account? Or can they also be used to track events booked with a team members. E.g. if I want to trigger something to occur anytime an event with any team-member is booked? Or do I need to use an API key for each teammembers account? (building this trigger in pipedream FWIW)
  • f

    Faiz Takwa

    05/26/2023, 6:22 AM
    Hello, Is there api endpoint for direct reschedule booking?
    p
    a
    • 3
    • 3
  • Ć”

    Ɓngel Rivera-PƔgan

    05/26/2023, 6:12 PM
    Hello, we are getting:
    Copy code
    @calcom/api:dev: warn(prisma-client) There are already 10 instances of Prisma Client actively running.
    this shows that each api call creates a new connection that doesn’t get closed
    Copy code
    SELECT * FROM pg_stat_activity WHERE datname = 'calendso';
    Is there something we are doing wrong?
  • b

    Brian Riwu Kaho

    05/31/2023, 5:54 AM
    Does the API support creation of date overrides? I don't see this in OpenAPI spec so probably not, but just double checking!
  • d

    Drivein Huddle

    05/31/2023, 8:50 PM
    Hello Team Is there a proper documentation to use the
    /bookings
    request. 1 There is no way to paginate the user booking result, every booking request made to the admin, and other team members will be returned 2 There is no way to filter the user booking request by either the user's email or user's Id 3 There is no way to filter user booking request by the booking status, I would like to see PENDING, ACCEPTED, REJECTED booking to display
    a
    • 2
    • 4
12345Latest