Update an OAuth client
curl --request PATCH \
--url https://api.cal.com/v2/oauth-clients/{clientId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"logo": "<string>",
"name": "<string>",
"redirectUris": [
"<string>"
],
"bookingRedirectUri": "<string>",
"bookingCancelRedirectUri": "<string>",
"bookingRescheduleRedirectUri": "<string>",
"areEmailsEnabled": true,
"areDefaultEventTypesEnabled": true,
"areCalendarEventsEnabled": true
}
'import requests
url = "https://api.cal.com/v2/oauth-clients/{clientId}"
payload = {
"logo": "<string>",
"name": "<string>",
"redirectUris": ["<string>"],
"bookingRedirectUri": "<string>",
"bookingCancelRedirectUri": "<string>",
"bookingRescheduleRedirectUri": "<string>",
"areEmailsEnabled": True,
"areDefaultEventTypesEnabled": True,
"areCalendarEventsEnabled": True
}
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({
logo: '<string>',
name: '<string>',
redirectUris: ['<string>'],
bookingRedirectUri: '<string>',
bookingCancelRedirectUri: '<string>',
bookingRescheduleRedirectUri: '<string>',
areEmailsEnabled: true,
areDefaultEventTypesEnabled: true,
areCalendarEventsEnabled: true
})
};
fetch('https://api.cal.com/v2/oauth-clients/{clientId}', 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/oauth-clients/{clientId}",
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([
'logo' => '<string>',
'name' => '<string>',
'redirectUris' => [
'<string>'
],
'bookingRedirectUri' => '<string>',
'bookingCancelRedirectUri' => '<string>',
'bookingRescheduleRedirectUri' => '<string>',
'areEmailsEnabled' => true,
'areDefaultEventTypesEnabled' => true,
'areCalendarEventsEnabled' => true
]),
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/oauth-clients/{clientId}"
payload := strings.NewReader("{\n \"logo\": \"<string>\",\n \"name\": \"<string>\",\n \"redirectUris\": [\n \"<string>\"\n ],\n \"bookingRedirectUri\": \"<string>\",\n \"bookingCancelRedirectUri\": \"<string>\",\n \"bookingRescheduleRedirectUri\": \"<string>\",\n \"areEmailsEnabled\": true,\n \"areDefaultEventTypesEnabled\": true,\n \"areCalendarEventsEnabled\": true\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/oauth-clients/{clientId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"logo\": \"<string>\",\n \"name\": \"<string>\",\n \"redirectUris\": [\n \"<string>\"\n ],\n \"bookingRedirectUri\": \"<string>\",\n \"bookingCancelRedirectUri\": \"<string>\",\n \"bookingRescheduleRedirectUri\": \"<string>\",\n \"areEmailsEnabled\": true,\n \"areDefaultEventTypesEnabled\": true,\n \"areCalendarEventsEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/oauth-clients/{clientId}")
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 \"logo\": \"<string>\",\n \"name\": \"<string>\",\n \"redirectUris\": [\n \"<string>\"\n ],\n \"bookingRedirectUri\": \"<string>\",\n \"bookingCancelRedirectUri\": \"<string>\",\n \"bookingRescheduleRedirectUri\": \"<string>\",\n \"areEmailsEnabled\": true,\n \"areDefaultEventTypesEnabled\": true,\n \"areCalendarEventsEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "clsx38nbl0001vkhlwin9fmt0",
"name": "MyClient",
"secret": "secretValue",
"permissions": [
"BOOKING_READ",
"BOOKING_WRITE"
],
"redirectUris": [
"https://example.com/callback"
],
"organizationId": 1,
"createdAt": "2024-03-23T08:33:21.851Z",
"areEmailsEnabled": true,
"areDefaultEventTypesEnabled": true,
"areCalendarEventsEnabled": true,
"logo": "https://example.com/logo.png",
"bookingRedirectUri": "https://example.com/booking-redirect",
"bookingCancelRedirectUri": "https://example.com/booking-cancel",
"bookingRescheduleRedirectUri": "https://example.com/booking-reschedule"
}
}Platform OAuth Clients
Update an OAuth client
These endpoints are deprecated and will be removed in the future.
PATCH
/
v2
/
oauth-clients
/
{clientId}
Update an OAuth client
curl --request PATCH \
--url https://api.cal.com/v2/oauth-clients/{clientId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"logo": "<string>",
"name": "<string>",
"redirectUris": [
"<string>"
],
"bookingRedirectUri": "<string>",
"bookingCancelRedirectUri": "<string>",
"bookingRescheduleRedirectUri": "<string>",
"areEmailsEnabled": true,
"areDefaultEventTypesEnabled": true,
"areCalendarEventsEnabled": true
}
'import requests
url = "https://api.cal.com/v2/oauth-clients/{clientId}"
payload = {
"logo": "<string>",
"name": "<string>",
"redirectUris": ["<string>"],
"bookingRedirectUri": "<string>",
"bookingCancelRedirectUri": "<string>",
"bookingRescheduleRedirectUri": "<string>",
"areEmailsEnabled": True,
"areDefaultEventTypesEnabled": True,
"areCalendarEventsEnabled": True
}
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({
logo: '<string>',
name: '<string>',
redirectUris: ['<string>'],
bookingRedirectUri: '<string>',
bookingCancelRedirectUri: '<string>',
bookingRescheduleRedirectUri: '<string>',
areEmailsEnabled: true,
areDefaultEventTypesEnabled: true,
areCalendarEventsEnabled: true
})
};
fetch('https://api.cal.com/v2/oauth-clients/{clientId}', 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/oauth-clients/{clientId}",
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([
'logo' => '<string>',
'name' => '<string>',
'redirectUris' => [
'<string>'
],
'bookingRedirectUri' => '<string>',
'bookingCancelRedirectUri' => '<string>',
'bookingRescheduleRedirectUri' => '<string>',
'areEmailsEnabled' => true,
'areDefaultEventTypesEnabled' => true,
'areCalendarEventsEnabled' => true
]),
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/oauth-clients/{clientId}"
payload := strings.NewReader("{\n \"logo\": \"<string>\",\n \"name\": \"<string>\",\n \"redirectUris\": [\n \"<string>\"\n ],\n \"bookingRedirectUri\": \"<string>\",\n \"bookingCancelRedirectUri\": \"<string>\",\n \"bookingRescheduleRedirectUri\": \"<string>\",\n \"areEmailsEnabled\": true,\n \"areDefaultEventTypesEnabled\": true,\n \"areCalendarEventsEnabled\": true\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/oauth-clients/{clientId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"logo\": \"<string>\",\n \"name\": \"<string>\",\n \"redirectUris\": [\n \"<string>\"\n ],\n \"bookingRedirectUri\": \"<string>\",\n \"bookingCancelRedirectUri\": \"<string>\",\n \"bookingRescheduleRedirectUri\": \"<string>\",\n \"areEmailsEnabled\": true,\n \"areDefaultEventTypesEnabled\": true,\n \"areCalendarEventsEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/oauth-clients/{clientId}")
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 \"logo\": \"<string>\",\n \"name\": \"<string>\",\n \"redirectUris\": [\n \"<string>\"\n ],\n \"bookingRedirectUri\": \"<string>\",\n \"bookingCancelRedirectUri\": \"<string>\",\n \"bookingRescheduleRedirectUri\": \"<string>\",\n \"areEmailsEnabled\": true,\n \"areDefaultEventTypesEnabled\": true,\n \"areCalendarEventsEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "clsx38nbl0001vkhlwin9fmt0",
"name": "MyClient",
"secret": "secretValue",
"permissions": [
"BOOKING_READ",
"BOOKING_WRITE"
],
"redirectUris": [
"https://example.com/callback"
],
"organizationId": 1,
"createdAt": "2024-03-23T08:33:21.851Z",
"areEmailsEnabled": true,
"areDefaultEventTypesEnabled": true,
"areCalendarEventsEnabled": true,
"logo": "https://example.com/logo.png",
"bookingRedirectUri": "https://example.com/booking-redirect",
"bookingCancelRedirectUri": "https://example.com/booking-cancel",
"bookingRescheduleRedirectUri": "https://example.com/booking-reschedule"
}
}Headers
value must be Bearer <token> where <token> is api key prefixed with cal_
Path Parameters
Body
application/json
If true, when creating a managed user the managed user will have 4 default event types: 30 and 60 minutes without Cal video, 30 and 60 minutes with Cal video. Set this as false if you want to create a managed user and then manually create event types for the user.
If true and if managed user has calendar connected, calendar events will be created. Disable it if you manually create calendar events. Default to true.
Was this page helpful?
⌘I