Skip to main content
PATCH
/
v2
/
slots
/
reservations
/
{uid}
Update a reserved slot
curl --request PATCH \
  --url https://api.cal.com/v2/slots/reservations/{uid} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'cal-api-version: <cal-api-version>' \
  --data '
{
  "eventTypeId": 1,
  "slotStart": "2024-09-04T09:00:00Z",
  "slotDuration": 30,
  "reservationDuration": 5
}
'
import requests

url = "https://api.cal.com/v2/slots/reservations/{uid}"

payload = {
"eventTypeId": 1,
"slotStart": "2024-09-04T09:00:00Z",
"slotDuration": 30,
"reservationDuration": 5
}
headers = {
"cal-api-version": "<cal-api-version>",
"Authorization": "Bearer <token>",
"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>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
eventTypeId: 1,
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' => 1,
'slotStart' => '2024-09-04T09:00:00Z',
'slotDuration' => 30,
'reservationDuration' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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\": 1,\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("Authorization", "Bearer <token>")
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("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventTypeId\": 1,\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["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventTypeId\": 1,\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": 1,
    "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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

cal-api-version
string
default:2024-09-04
required

Must be set to 2024-09-04. If not set to this value, the endpoint will default to an older version.

Path Parameters

uid
string
required

Body

application/json
eventTypeId
number
required

The ID of the event type for which slot should be reserved.

Example:

1

slotStart
string<date-time>
required

ISO 8601 datestring in UTC timezone representing available slot.

Example:

"2024-09-04T09:00:00Z"

slotDuration
number

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

reservationDuration
number

ONLY for authenticated requests with api key, access token or OAuth credentials (ID + secret).

For how many minutes the slot should be reserved - for this long time noone else can book this event type at `start` time. If not provided, defaults to 5 minutes.
Example:

5

Response

200 - application/json
status
enum<string>
required
Available options:
success,
error
Example:

"success"

data
object
required