Replace a host's limit for a pool
curl --request PUT \
--url https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"hostLimit": {
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2
}
}
'import requests
url = "https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId}"
payload = { "hostLimit": {
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2
} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostLimit: {perDay: 2, perWeek: 5, perMonth: 2, perYear: 2}})
};
fetch('https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId}', 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}/hosts/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'hostLimit' => [
'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/{poolId}/hosts/{userId}"
payload := strings.NewReader("{\n \"hostLimit\": {\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"hostLimit\": {\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hostLimit\": {\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostLimit": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500
},
"effectiveLimit": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500
}
}
}Booking Limit Pools
Replace a host's limit for a pool
Replaces the host’s own limit with the intervals sent; an omitted interval returns to the pool’s limit, so sending the same body again changes nothing. Only intervals the pool limits can be set, and each is capped at the host’s overall booking limit. If accessed using an OAuth access token, the TEAM_EVENT_TYPE_WRITE scope is required.
PUT
/
v2
/
teams
/
{teamId}
/
booking-limit-pools
/
{poolId}
/
hosts
/
{userId}
Replace a host's limit for a pool
curl --request PUT \
--url https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"hostLimit": {
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2
}
}
'import requests
url = "https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId}"
payload = { "hostLimit": {
"perDay": 2,
"perWeek": 5,
"perMonth": 2,
"perYear": 2
} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostLimit: {perDay: 2, perWeek: 5, perMonth: 2, perYear: 2}})
};
fetch('https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId}', 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}/hosts/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'hostLimit' => [
'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/{poolId}/hosts/{userId}"
payload := strings.NewReader("{\n \"hostLimit\": {\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"hostLimit\": {\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/teams/{teamId}/booking-limit-pools/{poolId}/hosts/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hostLimit\": {\n \"perDay\": 2,\n \"perWeek\": 5,\n \"perMonth\": 2,\n \"perYear\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostLimit": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500
},
"effectiveLimit": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500
}
}
}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.
User UUID; short UUID form is accepted too.
Body
application/json
The host's complete limit; an omitted or null interval uses the pool's limit, and an empty object clears the host's own limit.
Show child attributes
Show child attributes
Was this page helpful?