Mark a booking absence
curl --request POST \
--url https://api.cal.com/v2/bookings/{bookingUid}/mark-absent \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'cal-api-version: <cal-api-version>' \
--data '
{
"host": false,
"attendees": [
{
"email": "<string>",
"absent": true
}
]
}
'import requests
url = "https://api.cal.com/v2/bookings/{bookingUid}/mark-absent"
payload = {
"host": False,
"attendees": [
{
"email": "<string>",
"absent": True
}
]
}
headers = {
"cal-api-version": "<cal-api-version>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'cal-api-version': '<cal-api-version>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({host: false, attendees: [{email: '<string>', absent: true}]})
};
fetch('https://api.cal.com/v2/bookings/{bookingUid}/mark-absent', 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/bookings/{bookingUid}/mark-absent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'host' => false,
'attendees' => [
[
'email' => '<string>',
'absent' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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/bookings/{bookingUid}/mark-absent"
payload := strings.NewReader("{\n \"host\": false,\n \"attendees\": [\n {\n \"email\": \"<string>\",\n \"absent\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cal-api-version", "<cal-api-version>")
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.post("https://api.cal.com/v2/bookings/{bookingUid}/mark-absent")
.header("cal-api-version", "<cal-api-version>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"host\": false,\n \"attendees\": [\n {\n \"email\": \"<string>\",\n \"absent\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/bookings/{bookingUid}/mark-absent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cal-api-version"] = '<cal-api-version>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"host\": false,\n \"attendees\": [\n {\n \"email\": \"<string>\",\n \"absent\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 123,
"uid": "booking_uid_123",
"title": "Consultation",
"description": "Learn how to integrate scheduling into marketplace.",
"hosts": [
{
"id": 1,
"uuid": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"name": "Jane Doe",
"email": "jane100@example.com",
"displayEmail": "jane100@example.com",
"username": "jane100",
"timeZone": "America/Los_Angeles"
}
],
"status": "accepted",
"start": "2024-08-13T15:30:00Z",
"end": "2024-08-13T16:30:00Z",
"duration": 60,
"eventTypeId": 50,
"eventType": {
"id": 1,
"slug": "some-event"
},
"location": "https://example.com/meeting",
"absentHost": true,
"createdAt": "2024-08-13T15:30:00Z",
"updatedAt": "2024-08-13T15:30:00Z",
"attendees": [
{
"name": "John Doe",
"email": "john@example.com",
"displayEmail": "john@example.com",
"timeZone": "America/New_York",
"absent": false,
"language": "en",
"phoneNumber": "+1234567890"
}
],
"bookingFieldsResponses": {
"customField": "customValue"
},
"cancellationReason": "User requested cancellation",
"cancelledByEmail": "canceller@example.com",
"reschedulingReason": "User rescheduled the event",
"rescheduledByEmail": "rescheduler@example.com",
"rescheduledFromUid": "previous_uid_123",
"rescheduledToUid": "new_uid_456",
"eventUuid": "0199b5d2-7c1e-7f3a-9b4d-2e6f8a1c3d5e",
"meetingUrl": "https://example.com/recurring-meeting",
"metadata": {
"key": "value"
},
"rating": 4,
"icsUid": "ics_uid_123",
"guests": [
"guest1@example.com",
"guest2@example.com"
]
}
}Bookings
Mark a booking absence
The provided authorization header refers to the owner of the booking.
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.
If accessed using an OAuth access token, the BOOKING_WRITE scope is required.
POST
/
v2
/
bookings
/
{bookingUid}
/
mark-absent
Mark a booking absence
curl --request POST \
--url https://api.cal.com/v2/bookings/{bookingUid}/mark-absent \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'cal-api-version: <cal-api-version>' \
--data '
{
"host": false,
"attendees": [
{
"email": "<string>",
"absent": true
}
]
}
'import requests
url = "https://api.cal.com/v2/bookings/{bookingUid}/mark-absent"
payload = {
"host": False,
"attendees": [
{
"email": "<string>",
"absent": True
}
]
}
headers = {
"cal-api-version": "<cal-api-version>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'cal-api-version': '<cal-api-version>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({host: false, attendees: [{email: '<string>', absent: true}]})
};
fetch('https://api.cal.com/v2/bookings/{bookingUid}/mark-absent', 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/bookings/{bookingUid}/mark-absent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'host' => false,
'attendees' => [
[
'email' => '<string>',
'absent' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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/bookings/{bookingUid}/mark-absent"
payload := strings.NewReader("{\n \"host\": false,\n \"attendees\": [\n {\n \"email\": \"<string>\",\n \"absent\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cal-api-version", "<cal-api-version>")
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.post("https://api.cal.com/v2/bookings/{bookingUid}/mark-absent")
.header("cal-api-version", "<cal-api-version>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"host\": false,\n \"attendees\": [\n {\n \"email\": \"<string>\",\n \"absent\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/bookings/{bookingUid}/mark-absent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cal-api-version"] = '<cal-api-version>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"host\": false,\n \"attendees\": [\n {\n \"email\": \"<string>\",\n \"absent\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 123,
"uid": "booking_uid_123",
"title": "Consultation",
"description": "Learn how to integrate scheduling into marketplace.",
"hosts": [
{
"id": 1,
"uuid": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"name": "Jane Doe",
"email": "jane100@example.com",
"displayEmail": "jane100@example.com",
"username": "jane100",
"timeZone": "America/Los_Angeles"
}
],
"status": "accepted",
"start": "2024-08-13T15:30:00Z",
"end": "2024-08-13T16:30:00Z",
"duration": 60,
"eventTypeId": 50,
"eventType": {
"id": 1,
"slug": "some-event"
},
"location": "https://example.com/meeting",
"absentHost": true,
"createdAt": "2024-08-13T15:30:00Z",
"updatedAt": "2024-08-13T15:30:00Z",
"attendees": [
{
"name": "John Doe",
"email": "john@example.com",
"displayEmail": "john@example.com",
"timeZone": "America/New_York",
"absent": false,
"language": "en",
"phoneNumber": "+1234567890"
}
],
"bookingFieldsResponses": {
"customField": "customValue"
},
"cancellationReason": "User requested cancellation",
"cancelledByEmail": "canceller@example.com",
"reschedulingReason": "User rescheduled the event",
"rescheduledByEmail": "rescheduler@example.com",
"rescheduledFromUid": "previous_uid_123",
"rescheduledToUid": "new_uid_456",
"eventUuid": "0199b5d2-7c1e-7f3a-9b4d-2e6f8a1c3d5e",
"meetingUrl": "https://example.com/recurring-meeting",
"metadata": {
"key": "value"
},
"rating": 4,
"icsUid": "ics_uid_123",
"guests": [
"guest1@example.com",
"guest2@example.com"
]
}
}Headers
Body
application/json
Was this page helpful?