Update an organization team role
curl --request PATCH \
--url https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/roles/{roleId} \
--header 'Content-Type: application/json' \
--data '
{
"color": "<string>",
"description": "<string>",
"permissions": [
"eventType.read",
"eventType.create",
"booking.read"
],
"name": "<string>"
}
'import requests
url = "https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/roles/{roleId}"
payload = {
"color": "<string>",
"description": "<string>",
"permissions": ["eventType.read", "eventType.create", "booking.read"],
"name": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
color: '<string>',
description: '<string>',
permissions: ['eventType.read', 'eventType.create', 'booking.read'],
name: '<string>'
})
};
fetch('https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/roles/{roleId}', 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/organizations/{orgId}/teams/{teamId}/roles/{roleId}",
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([
'color' => '<string>',
'description' => '<string>',
'permissions' => [
'eventType.read',
'eventType.create',
'booking.read'
],
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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/organizations/{orgId}/teams/{teamId}/roles/{roleId}"
payload := strings.NewReader("{\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"permissions\": [\n \"eventType.read\",\n \"eventType.create\",\n \"booking.read\"\n ],\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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/organizations/{orgId}/teams/{teamId}/roles/{roleId}")
.header("Content-Type", "application/json")
.body("{\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"permissions\": [\n \"eventType.read\",\n \"eventType.create\",\n \"booking.read\"\n ],\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/roles/{roleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"permissions\": [\n \"eventType.read\",\n \"eventType.create\",\n \"booking.read\"\n ],\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "<string>",
"name": "<string>",
"type": "SYSTEM",
"permissions": [
"booking.read",
"eventType.create"
],
"createdAt": "<string>",
"updatedAt": "<string>",
"color": "<string>",
"description": "<string>",
"teamId": 123
}
}Roles
Update an organization team role
PATCH
/
v2
/
organizations
/
{orgId}
/
teams
/
{teamId}
/
roles
/
{roleId}
Update an organization team role
curl --request PATCH \
--url https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/roles/{roleId} \
--header 'Content-Type: application/json' \
--data '
{
"color": "<string>",
"description": "<string>",
"permissions": [
"eventType.read",
"eventType.create",
"booking.read"
],
"name": "<string>"
}
'import requests
url = "https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/roles/{roleId}"
payload = {
"color": "<string>",
"description": "<string>",
"permissions": ["eventType.read", "eventType.create", "booking.read"],
"name": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
color: '<string>',
description: '<string>',
permissions: ['eventType.read', 'eventType.create', 'booking.read'],
name: '<string>'
})
};
fetch('https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/roles/{roleId}', 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/organizations/{orgId}/teams/{teamId}/roles/{roleId}",
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([
'color' => '<string>',
'description' => '<string>',
'permissions' => [
'eventType.read',
'eventType.create',
'booking.read'
],
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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/organizations/{orgId}/teams/{teamId}/roles/{roleId}"
payload := strings.NewReader("{\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"permissions\": [\n \"eventType.read\",\n \"eventType.create\",\n \"booking.read\"\n ],\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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/organizations/{orgId}/teams/{teamId}/roles/{roleId}")
.header("Content-Type", "application/json")
.body("{\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"permissions\": [\n \"eventType.read\",\n \"eventType.create\",\n \"booking.read\"\n ],\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/roles/{roleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"permissions\": [\n \"eventType.read\",\n \"eventType.create\",\n \"booking.read\"\n ],\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "<string>",
"name": "<string>",
"type": "SYSTEM",
"permissions": [
"booking.read",
"eventType.create"
],
"createdAt": "<string>",
"updatedAt": "<string>",
"color": "<string>",
"description": "<string>",
"teamId": 123
}
}Headers
For non-platform customers - value must be Bearer <token> where <token> is api key prefixed with cal_
For platform customers - OAuth client secret key
For platform customers - OAuth client ID
Body
application/json
Color for the role (hex code)
Description of the role
Permissions for this role (format: resource.action). On update, this field replaces the entire permission set for the role (full replace). Use granular permission endpoints for one-by-one changes.
Available options:
role.create, role.read, role.readTeamRoles, role.update, role.delete, eventType.create, eventType.read, eventType.readTeamEventTypes, eventType.update, eventType.delete, team.read, team.readTeamSettings, team.readConferencing, team.readVerifiedResources, team.readMemberships, team.update, team.delete, team.invite, team.remove, team.listMembers, team.listMembersPrivate, team.changeMemberRole, team.impersonate, booking.read, booking.readTeamBookings, booking.readRecordings, booking.update, booking.updateTeamBookings, booking.reassignTeamPastBookings, booking.readTeamAuditLogs, insights.read, workflow.create, workflow.read, workflow.readTeamWorkflows, workflow.update, workflow.delete, routingForm.create, routingForm.read, routingForm.readTeamRoutingForms, routingForm.update, routingForm.delete, routingForm.readTeamAuditLogs, routingForm.readResponsePii, webhook.create, webhook.read, webhook.update, webhook.delete, availability.readTeamAvailability, featureOptIn.read, featureOptIn.update, tag.create, tag.update, tag.delete Example:
[
"eventType.read",
"eventType.create",
"booking.read"
]
Name of the role
Minimum string length:
1Was this page helpful?