Query for open time slots to find when a user is available for bookings. Use this endpoint to verify a user is properly configured.
Endpoint
GET /v4/user/{userId}/bookable-windows
| Header | Required | Description |
|---|
Authorization | Yes | Bearer <your-api-key> |
x-meetergo-api-user-id | Yes | UUID of the user context |
Path Parameters
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | UUID of the user to query availability for |
Query Parameters
| Parameter | Type | Required | Description |
|---|
startDate | string | Yes | Start date in YYYY-MM-DD format |
endDate | string | Yes | End date in YYYY-MM-DD format |
Examples
curl -X GET "https://api.meetergo.com/v4/user/550e8400-e29b-41d4-a716-446655440000/bookable-windows?startDate=2024-01-15&endDate=2024-01-20" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-meetergo-api-user-id: 550e8400-e29b-41d4-a716-446655440000"
Response
Success (200 OK)
A list of available start times in ISO 8601 format:
{
"windows": [
"2024-01-15T09:00:00Z",
"2024-01-15T09:45:00Z",
"2024-01-15T10:30:00Z",
"2024-01-15T11:15:00Z",
"2024-01-15T12:00:00Z",
"2024-01-15T14:00:00Z",
"2024-01-15T14:45:00Z",
"2024-01-15T15:30:00Z",
"2024-01-16T09:00:00Z",
"2024-01-16T09:45:00Z"
]
}
| Field | Description |
|---|
windows | Array of available booking start times in ISO 8601 format |
The time slots respect the user’s configured availability schedule, existing bookings, and meeting type duration.
Empty Response
If no slots are available in the date range:
An empty response could mean:
- The user has no availability configured for those dates
- All slots are already booked
- The date range is in the past
Error Responses
404 Not Found - User Not Found
{
"statusCode": 404,
"message": "User not found",
"error": "Not Found"
}
{
"statusCode": 400,
"message": "Invalid date format. Use YYYY-MM-DD",
"error": "Bad Request"
}
400 Bad Request - Missing Parameters
{
"statusCode": 400,
"message": "startDate and endDate are required",
"error": "Bad Request"
}
Use Cases
Verifying User Configuration
After creating a user, use this endpoint to confirm they’re properly configured:
// After creating a user
const { userId } = await createUser({ ... });
// Verify they have available slots
const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
const nextWeek = new Date();
nextWeek.setDate(nextWeek.getDate() + 7);
const response = await fetch(
`https://api.meetergo.com/v4/user/${userId}/bookable-windows?` + new URLSearchParams({
startDate: tomorrow.toISOString().split('T')[0],
endDate: nextWeek.toISOString().split('T')[0]
}),
{ headers: { ... } }
);
const { windows } = await response.json();
if (windows.length > 0) {
console.log('User is ready for bookings!');
} else {
console.log('No available slots - check availability configuration');
}