Bookings
This guide explains how to use booking-related APIs in AISquare.
These APIs integrate with Cal.com for scheduling functionality.
Overview
The bookings APIs allow you to:
- Retrieve configuration for Cal.com integration
- Refresh access tokens
- Retrieve user details
All endpoints are scoped to the authenticated user.
Authentication
Bookings endpoints use:
- JWT authentication
- API key (where required)
Get configuration
Retrieve Cal.com configuration details required for frontend integration.
Endpoint
Access control
- Requires authentication
- Returns
401if unauthorized
Response
- Cal.com configuration data
Token refresh and integration
Refresh the Cal.com access token or perform initial integration.
Endpoint
Request body
- Uses
CalTokenRefreshRequestschema
Behavior
- Refreshes access token for existing users
- Handles initial integration for first-time users
Response includes
access_tokenexpires_intoken_typerefreshed(boolean)integration_status(createdorexisting)cal_client_id
Status codes
Get user details
Retrieve Cal.com user details for the authenticated user.
Endpoint
Access control
- Requires authentication
- Returns
404if user not found
Response
- User details based on
CalUserschema
Notes
- Bookings APIs are tied to Cal.com integration
- Token refresh endpoint supports both initial setup and refresh
- All endpoints require authentication
When to use these endpoints
Related pages
- Authentication — JWT and API key setup
- Token lifecycle & session management — token refresh patterns
- Errors — handle 400, 401, 500 responses
- Support — get help with integration issues

