Update a booking limit pool
curl --request PATCH \
--url https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2,
"name": "Engineering interviews",
"eventTypeIds": [
"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116",
"15314c7c-11a0-440d-9ae9-23593c193a2b"
]
}
'import requests
url = "https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}"
payload = {
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2,
"name": "Engineering interviews",
"eventTypeIds": ["0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116", "15314c7c-11a0-440d-9ae9-23593c193a2b"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
perDay: 2,
perWeek: 5,
perMonth: 2,
perYear: 2,
name: 'Engineering interviews',
eventTypeIds: ['0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116', '15314c7c-11a0-440d-9ae9-23593c193a2b']
})
};
fetch('https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}', 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/{poolId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'perDay' => 2,
'perWeek' => 5,
'perMonth' => 2,
'perYear' => 2,
'name' => 'Engineering interviews',
'eventTypeIds' => [
'0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116',
'15314c7c-11a0-440d-9ae9-23593c193a2b'
]
]),
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/{poolId}"
payload := strings.NewReader("{\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2,\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2,\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2,\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ]\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
Update a booking limit pool
Changes only the fields sent. An interval sent as null is removed. Changing the mode or event types keeps every host’s own limit. If accessed using an OAuth access token, the TEAM_EVENT_TYPE_WRITE scope is required.
PATCH
/
v2
/
teams
/
{teamId}
/
booking-limit-pools
/
{poolId}
Update a booking limit pool
curl --request PATCH \
--url https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2,
"name": "Engineering interviews",
"eventTypeIds": [
"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116",
"15314c7c-11a0-440d-9ae9-23593c193a2b"
]
}
'import requests
url = "https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}"
payload = {
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2,
"name": "Engineering interviews",
"eventTypeIds": ["0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116", "15314c7c-11a0-440d-9ae9-23593c193a2b"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
perDay: 2,
perWeek: 5,
perMonth: 2,
perYear: 2,
name: 'Engineering interviews',
eventTypeIds: ['0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116', '15314c7c-11a0-440d-9ae9-23593c193a2b']
})
};
fetch('https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}', 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/{poolId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'perDay' => 2,
'perWeek' => 5,
'perMonth' => 2,
'perYear' => 2,
'name' => 'Engineering interviews',
'eventTypeIds' => [
'0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116',
'15314c7c-11a0-440d-9ae9-23593c193a2b'
]
]),
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/{poolId}"
payload := strings.NewReader("{\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2,\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2,\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2,\n \"name\": \"Engineering interviews\",\n \"eventTypeIds\": [\n \"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116\",\n \"15314c7c-11a0-440d-9ae9-23593c193a2b\"\n ]\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
Pool UUID; short UUID form is accepted too.
The team's uuid (preferred), its short-uuid (Flickr Base58) form, or its numeric id.
Body
application/json
Required range:
x >= 1Example:
2
Required range:
x >= 1Example:
5
Required range:
x >= 1Required range:
x >= 1Minimum string length:
1Example:
"Engineering interviews"
Changing the mode keeps every host's own limit.
Available options:
SHARED, PER_EVENT Replaces the pool's event types.
Required array length:
1 - 100 elementsExample:
[
"0bce7b70-d7f0-4e5f-bcce-2f41b6fd5116",
"15314c7c-11a0-440d-9ae9-23593c193a2b"
]
Was this page helpful?