Skip to main content
Community Member
Feb 13, 2025 9:49 AM UTC
Question

First available slot - how to fetch via API?

Hello!

For number of days we are trying to fetch information about the first available slot for an event (API) to present on our website. Unfortunately, we are doing something wrong. Here’s a message from my developer: 

We have fetched all event_types from the user. We are trying to retrieve the schedule for a specific event.

URI: https://api.calendly.com/event_types/1fd06bb2-983f-4847-9751-ebd631d21f7a | UID: 1fd06bb2-983f-4847-9751-ebd631d21f7a

We are attempting to do this using the following endpoint: https://developer.calendly.com/api-docs/6a1be82aef359-list-event-type-available-times Unfortunately, it doesn’t work, neither in the code nor via the link above.

We are passing the following parameters: • end_time: 2025-02-13T01:00:00.000000Z • event_type: https://api.calendly.com/event_types/1fd06bb2-983f-4847-9751-ebd631d21f7a • start_time: 2025-02-20T01:00:00.000000Z

What are we doing wrong?

 

    2 replies

    Community Member
    Feb 18, 2025 4:47 PM UTC

    Hello Calendly Team? :)

    Employee
    Feb 22, 2025 12:21 AM UTC

    It looks like you are specifying a value for end_date (Feb 13) that is prior to start_date (Feb 20).

    There are a number of requirements in order for your request to be valid:

    • start_time and end_time must both be present
    • start_time may not be in the past
    • start_time must be before end_time
    • range must be 7 days or less

    We have these requirements documented in https://developer.calendly.com/api-docs/6a1be82aef359-list-event-type-available-times but I’ll see that the error responses from the API provide more details to why the request failed.

    Please give it another try making sure your request meets those criteria and share the details if you are still having issues.