Update a reserved slot
curl --request PATCH \
--url https://api.cal.com/v2/slots/reservations/{uid} \
--header 'Content-Type: application/json' \
--header 'cal-api-version: <cal-api-version>' \
--data '
{
"eventTypeId": 123,
"slotStart": "2024-09-04T09:00:00Z",
"slotDuration": 30,
"reservationDuration": 5
}
'import requests
url = "https://api.cal.com/v2/slots/reservations/{uid}"
payload = {
"eventTypeId": 123,
"slotStart": "2024-09-04T09:00:00Z",
"slotDuration": 30,
"reservationDuration": 5
}
headers = {
"cal-api-version": "<cal-api-version>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'cal-api-version': '<cal-api-version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventTypeId: 123,
slotStart: '2024-09-04T09:00:00Z',
slotDuration: 30,
reservationDuration: 5
})
};
fetch('https://api.cal.com/v2/slots/reservations/{uid}', 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/slots/reservations/{uid}",
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([
'eventTypeId' => 123,
'slotStart' => '2024-09-04T09:00:00Z',
'slotDuration' => 30,
'reservationDuration' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"cal-api-version: <cal-api-version>"
],
]);
$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/slots/reservations/{uid}"
payload := strings.NewReader("{\n \"eventTypeId\": 123,\n \"slotStart\": \"2024-09-04T09:00:00Z\",\n \"slotDuration\": 30,\n \"reservationDuration\": 5\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cal-api-version", "<cal-api-version>")
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/slots/reservations/{uid}")
.header("cal-api-version", "<cal-api-version>")
.header("Content-Type", "application/json")
.body("{\n \"eventTypeId\": 123,\n \"slotStart\": \"2024-09-04T09:00:00Z\",\n \"slotDuration\": 30,\n \"reservationDuration\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/slots/reservations/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cal-api-version"] = '<cal-api-version>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventTypeId\": 123,\n \"slotStart\": \"2024-09-04T09:00:00Z\",\n \"slotDuration\": 30,\n \"reservationDuration\": 5\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"eventTypeId": 123,
"slotStart": "2024-09-04T09:00:00Z",
"slotEnd": "2024-09-04T10:00:00Z",
"slotDuration": 30,
"reservationUid": "e84be5a3-4696-49e3-acc7-b2f3999c3b94",
"reservationDuration": 5,
"reservationUntil": "2023-09-04T10:00:00Z"
}
}Slots
Update a reserved slot
If you specify a custom reservation duration, you must authenticate using oAuth credentials, api key or access token.
Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.
PATCH
/
v2
/
slots
/
reservations
/
{uid}
Update a reserved slot
curl --request PATCH \
--url https://api.cal.com/v2/slots/reservations/{uid} \
--header 'Content-Type: application/json' \
--header 'cal-api-version: <cal-api-version>' \
--data '
{
"eventTypeId": 123,
"slotStart": "2024-09-04T09:00:00Z",
"slotDuration": 30,
"reservationDuration": 5
}
'import requests
url = "https://api.cal.com/v2/slots/reservations/{uid}"
payload = {
"eventTypeId": 123,
"slotStart": "2024-09-04T09:00:00Z",
"slotDuration": 30,
"reservationDuration": 5
}
headers = {
"cal-api-version": "<cal-api-version>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'cal-api-version': '<cal-api-version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventTypeId: 123,
slotStart: '2024-09-04T09:00:00Z',
slotDuration: 30,
reservationDuration: 5
})
};
fetch('https://api.cal.com/v2/slots/reservations/{uid}', 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/slots/reservations/{uid}",
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([
'eventTypeId' => 123,
'slotStart' => '2024-09-04T09:00:00Z',
'slotDuration' => 30,
'reservationDuration' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"cal-api-version: <cal-api-version>"
],
]);
$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/slots/reservations/{uid}"
payload := strings.NewReader("{\n \"eventTypeId\": 123,\n \"slotStart\": \"2024-09-04T09:00:00Z\",\n \"slotDuration\": 30,\n \"reservationDuration\": 5\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cal-api-version", "<cal-api-version>")
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/slots/reservations/{uid}")
.header("cal-api-version", "<cal-api-version>")
.header("Content-Type", "application/json")
.body("{\n \"eventTypeId\": 123,\n \"slotStart\": \"2024-09-04T09:00:00Z\",\n \"slotDuration\": 30,\n \"reservationDuration\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/slots/reservations/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cal-api-version"] = '<cal-api-version>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventTypeId\": 123,\n \"slotStart\": \"2024-09-04T09:00:00Z\",\n \"slotDuration\": 30,\n \"reservationDuration\": 5\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"eventTypeId": 123,
"slotStart": "2024-09-04T09:00:00Z",
"slotEnd": "2024-09-04T10:00:00Z",
"slotDuration": 30,
"reservationUid": "e84be5a3-4696-49e3-acc7-b2f3999c3b94",
"reservationDuration": 5,
"reservationUntil": "2023-09-04T10:00:00Z"
}
}Headers
Body
application/json
By default slot duration is equal to event type length, but if you want to reserve a slot for an event type that has a variable length you can specify it here as a number in minutes. If you don't have this set explicitly that event type can have one of many lengths you can omit this.
Example:
30
Was this page helpful?