Create a booking limit pool
curl --request POST \
--url https://api.cal.com/v2/teams/{teamId}/booking-limit-pools \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Engineering interviews",
"eventTypeIds": [
"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116",
"15314c7c-11a0-440d-9ae9-23593c193a2b"
],
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2
}
'import requests
url = "https://api.cal.com/v2/teams/{teamId}/booking-limit-pools"
payload = {
"name": "Engineering interviews",
"eventTypeIds": ["0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116", "15314c7c-11a0-440d-9ae9-23593c193a2b"],
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Engineering interviews',
eventTypeIds: ['0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116', '15314c7c-11a0-440d-9ae9-23593c193a2b'],
perDay: 2,
perWeek: 5,
perMonth: 2,
perYear: 2
})
};
fetch('https://api.cal.com/v2/teams/{teamId}/booking-limit-pools', 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/teams/{teamId}/booking-limit-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Engineering interviews',
'eventTypeIds' => [
'0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116',
'15314c7c-11a0-440d-9ae9-23593c193a2b'
],
'perDay' => 2,
'perWeek' => 5,
'perMonth' => 2,
'perYear' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/teams/{teamId}/booking-limit-pools"
payload := strings.NewReader("{\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ],\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ],\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ],\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": 123,
"name": "<string>",
"mode": "SHARED",
"archived": true,
"eventTypes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
}
}Booking Limit Pools
Create a booking limit pool
Caps how many bookings each rotating host takes across the pool’s round-robin event types. Set at least one interval. Requires permission to update the team’s event types. If accessed using an OAuth access token, the TEAM_EVENT_TYPE_WRITE scope is required.
POST
/
v2
/
teams
/
{teamId}
/
booking-limit-pools
Create a booking limit pool
curl --request POST \
--url https://api.cal.com/v2/teams/{teamId}/booking-limit-pools \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Engineering interviews",
"eventTypeIds": [
"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116",
"15314c7c-11a0-440d-9ae9-23593c193a2b"
],
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2
}
'import requests
url = "https://api.cal.com/v2/teams/{teamId}/booking-limit-pools"
payload = {
"name": "Engineering interviews",
"eventTypeIds": ["0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116", "15314c7c-11a0-440d-9ae9-23593c193a2b"],
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Engineering interviews',
eventTypeIds: ['0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116', '15314c7c-11a0-440d-9ae9-23593c193a2b'],
perDay: 2,
perWeek: 5,
perMonth: 2,
perYear: 2
})
};
fetch('https://api.cal.com/v2/teams/{teamId}/booking-limit-pools', 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/teams/{teamId}/booking-limit-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Engineering interviews',
'eventTypeIds' => [
'0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116',
'15314c7c-11a0-440d-9ae9-23593c193a2b'
],
'perDay' => 2,
'perWeek' => 5,
'perMonth' => 2,
'perYear' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/teams/{teamId}/booking-limit-pools"
payload := strings.NewReader("{\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ],\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ],\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ],\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": 123,
"name": "<string>",
"mode": "SHARED",
"archived": true,
"eventTypes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
}
}Headers
value must be Bearer <token> where <token> is api key prefixed with cal_, managed user access token, or OAuth access token
Path Parameters
Body
application/json
Minimum string length:
1Example:
"Engineering interviews"
SHARED: each host has one allowance across every event in the pool. PER_EVENT: the same allowance applies to each event separately.
Available options:
SHARED, PER_EVENT Round-robin event types of the team. Each event type can be in one pool.
Required array length:
1 - 100 elementsExample:
[
"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116",
"15314c7c-11a0-440d-9ae9-23593c193a2b"
]
Required range:
x >= 1Example:
2
Required range:
x >= 1Example:
5
Required range:
x >= 1Required range:
x >= 1Was this page helpful?