curl --request GET \
--url https://api.cal.com/v2/calendars/busy-times \
--header 'Authorization: <authorization>'import requests
url = "https://api.cal.com/v2/calendars/busy-times"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.cal.com/v2/calendars/busy-times', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cal.com/v2/calendars/busy-times",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/calendars/busy-times"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cal.com/v2/calendars/busy-times")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/calendars/busy-times")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"source": "<string>"
}
]
}Get busy times
Get busy times from a calendar. Example request URL is https://api.cal.com/v2/calendars/busy-times?timeZone=Europe%2FMadrid&dateFrom=2024-12-18&dateTo=2024-12-18&calendar=135,skrauciz%40gmail.com&calendar=200,bob%40gmail.com.
The calendar query parameter identifies one calendar as <credentialId>,<externalId>, e.g. calendar=135,alice@example.com. Both values are returned for each connected calendar by GET /v2/calendars. To load busy times from multiple calendars, pass the calendar query parameter multiple times, e.g. calendar=135,alice@example.com&calendar=200,bob@example.com. Only the first comma separates the two values, so an externalId containing commas is kept intact.
Note: loggedInUsersTz is deprecated, use timeZone instead. If accessed using an OAuth access token, the APPS_READ scope is required.
curl --request GET \
--url https://api.cal.com/v2/calendars/busy-times \
--header 'Authorization: <authorization>'import requests
url = "https://api.cal.com/v2/calendars/busy-times"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.cal.com/v2/calendars/busy-times', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cal.com/v2/calendars/busy-times",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/calendars/busy-times"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cal.com/v2/calendars/busy-times")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/calendars/busy-times")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"source": "<string>"
}
]
}Headers
value must be Bearer <token> where <token> is api key prefixed with cal_, managed user access token, or OAuth access token
Query Parameters
Deprecated: Use timeZone instead. The timezone of the user represented as a string
"America/New_York"
The timezone for the busy times query represented as a string
"America/New_York"
The starting date for the busy times query
"2023-10-01"
The ending date for the busy times query
"2023-10-31"
Calendar to load busy times from, formatted as credentialId,externalId. Repeat the parameter to load multiple calendars, e.g. calendar=135,alice@example.com&calendar=200,bob@example.com. At least one calendar is required.
^\d+,.+$["135,alice@example.com"]
Was this page helpful?