LogoRecal

Create User Scheduling

Get available time slots based on free-busy data with advanced parameters

POST
/v1/users/{userId}/scheduling

Authorization

AuthorizationRequiredBearer <token>

The Recal API token

In: header

Request Body

application/jsonRequired
schedulesRequiredarray<object>

Path Parameters

userIdRequiredstring

Query Parameters

providerstring | array<unknown>
paddingRequirednumber

Padding in minutes to add before and after busy times

Default: 0
slotDurationRequirednumber

Duration of each slot in minutes

Default: 30
startDateRequiredDate | string | number
endDateRequiredDate | string | number

Header Parameters

x-timezonestring
Default: "UTC"

Response Body

TypeScript Definitions

Use the response body type in TypeScript.

availableSlotsRequiredarray<object>
optionsRequiredobject

TypeScript Definitions

Use the response body type in TypeScript.

responseRequiredstring

TypeScript Definitions

Use the response body type in TypeScript.

responseRequiredstring

TypeScript Definitions

Use the response body type in TypeScript.

responseRequiredstring
curl -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"