curl --request PATCH \
--url https://api.cal.com/v2/me/team-booking-limits/{teamId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"perDay": 2,
"perWeek": 3,
"perMonth": 12,
"perYear": 100
}
'import requests
url = "https://api.cal.com/v2/me/team-booking-limits/{teamId}"
payload = {
"perDay": 2,
"perWeek": 3,
"perMonth": 12,
"perYear": 100
}
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: 3, perMonth: 12, perYear: 100})
};
fetch('https://api.cal.com/v2/me/team-booking-limits/{teamId}', 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/me/team-booking-limits/{teamId}",
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' => 3,
'perMonth' => 12,
'perYear' => 100
]),
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/me/team-booking-limits/{teamId}"
payload := strings.NewReader("{\n \"perDay\": 2,\n \"perWeek\": 3,\n \"perMonth\": 12,\n \"perYear\": 100\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/me/team-booking-limits/{teamId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"perDay\": 2,\n \"perWeek\": 3,\n \"perMonth\": 12,\n \"perYear\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/me/team-booking-limits/{teamId}")
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\": 3,\n \"perMonth\": 12,\n \"perYear\": 100\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"teamId": 42,
"teamName": "Engineering",
"teamLimit": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500
},
"memberLimit": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500
},
"effectiveLimit": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500
}
}
}Set my booking limit for one team
Sets your own numbers for this team’s booking limit. Intervals you omit keep what you stored before, an interval sent as null goes back to inheriting the team default, and every value is capped at your own overall limit for the same interval. Only teams you are a round-robin host of accept this; the number is enforced on that team’s round-robin events only, while collective events and events where you are a fixed host keep the team default. If accessed using an OAuth access token, the PROFILE_WRITE scope is required.
curl --request PATCH \
--url https://api.cal.com/v2/me/team-booking-limits/{teamId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"perDay": 2,
"perWeek": 3,
"perMonth": 12,
"perYear": 100
}
'import requests
url = "https://api.cal.com/v2/me/team-booking-limits/{teamId}"
payload = {
"perDay": 2,
"perWeek": 3,
"perMonth": 12,
"perYear": 100
}
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: 3, perMonth: 12, perYear: 100})
};
fetch('https://api.cal.com/v2/me/team-booking-limits/{teamId}', 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/me/team-booking-limits/{teamId}",
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' => 3,
'perMonth' => 12,
'perYear' => 100
]),
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/me/team-booking-limits/{teamId}"
payload := strings.NewReader("{\n \"perDay\": 2,\n \"perWeek\": 3,\n \"perMonth\": 12,\n \"perYear\": 100\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/me/team-booking-limits/{teamId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"perDay\": 2,\n \"perWeek\": 3,\n \"perMonth\": 12,\n \"perYear\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/me/team-booking-limits/{teamId}")
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\": 3,\n \"perMonth\": 12,\n \"perYear\": 100\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"teamId": 42,
"teamName": "Engineering",
"teamLimit": {
"perDay": 4,
"perWeek": 20,
"perMonth": 60,
"perYear": 500
},
"memberLimit": {
"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
Body
Maximum bookings you take per day across this team's round-robin events. Pass null to inherit this interval; use DELETE to clear all intervals.
x >= 12
Maximum bookings you take per week across this team's round-robin events. Pass null to inherit this interval; use DELETE to clear all intervals.
x >= 13
Maximum bookings you take per month across this team's round-robin events. Pass null to inherit this interval; use DELETE to clear all intervals.
x >= 112
Maximum bookings you take per year across this team's round-robin events. Pass null to inherit this interval; use DELETE to clear all intervals.
x >= 1100
Was this page helpful?