Create User Scheduling
Get available time slots based on free-busy data with advanced parameters
Authorization
Authorization
RequiredBearer <token>The Recal API token
In: header
Request Body
application/json
Requiredschedules
Requiredarray<object>Path Parameters
userId
RequiredstringQuery Parameters
provider
string | array<unknown>padding
RequirednumberPadding in minutes to add before and after busy times
Default:
0
slotDuration
RequirednumberDuration of each slot in minutes
Default:
30
startDate
RequiredDate | string | numberendDate
RequiredDate | string | numberHeader Parameters
x-timezone
stringDefault:
"UTC"
Response Body
TypeScript Definitions
Use the response body type in TypeScript.
availableSlots
Requiredarray<object>options
RequiredobjectTypeScript Definitions
Use the response body type in TypeScript.
response
RequiredstringTypeScript Definitions
Use the response body type in TypeScript.
response
RequiredstringTypeScript Definitions
Use the response body type in TypeScript.
response
Requiredstringcurl -X POST "https://api.recal.dev/v1/users/string/scheduling?provider=google&padding=0&slotDuration=30&startDate=2025-06-04T00%3A00%3A00.000Z&endDate=2025-06-10T00%3A00%3A00.000Z" \
-H "x-timezone: UTC" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"schedules": [
{
"days": [
"monday"
],
"start": "14:00",
"end": "14:00"
}
]
}'
const body = JSON.stringify({
"schedules": [
{
"days": [
"monday"
],
"start": "14:00",
"end": "14:00"
}
]
})
fetch("https://api.recal.dev/v1/users/string/scheduling?provider=google&padding=0&slotDuration=30&startDate=2025-06-04T00%3A00%3A00.000Z&endDate=2025-06-10T00%3A00%3A00.000Z", {
headers: {
"x-timezone": "UTC",
"Authorization": "Bearer <token>"
},
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.recal.dev/v1/users/string/scheduling?provider=google&padding=0&slotDuration=30&startDate=2025-06-04T00%3A00%3A00.000Z&endDate=2025-06-10T00%3A00%3A00.000Z"
body := strings.NewReader(`{
"schedules": [
{
"days": [
"monday"
],
"start": "14:00",
"end": "14:00"
}
]
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("x-timezone", "UTC")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.recal.dev/v1/users/string/scheduling?provider=google&padding=0&slotDuration=30&startDate=2025-06-04T00%3A00%3A00.000Z&endDate=2025-06-10T00%3A00%3A00.000Z"
body = {
"schedules": [
{
"days": [
"monday"
],
"start": "14:00",
"end": "14:00"
}
]
}
response = requests.request("POST", url, json = body, headers = {
"x-timezone": "UTC",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
})
print(response.text)
{
"availableSlots": [
{
"start": "1970-01-01T01:00:00.000+01:00",
"end": "1970-01-01T01:00:00.000+01:00"
}
],
"options": {
"padding": 0,
"slotDuration": 30,
"startDate": "2025-06-04T00:00:00.000Z",
"endDate": "2025-06-10T00:00:00.000Z",
"schedules": [
{
"days": [
"monday"
],
"start": "14:00",
"end": "14:00"
}
]
}
}
"Unable to process date: Invalid date format"
"User not found"
"An error occurred while processing your request"