Cancel Event
curl --request POST \
--url https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel \
--header 'Content-Type: application/json' \
--header 'X-Access-Key-Id: <api-key>' \
--header 'X-Access-Key-Secret: <api-key>' \
--data '
{
"cancel_note": "<string>"
}
'import requests
url = "https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel"
payload = { "cancel_note": "<string>" }
headers = {
"X-Access-Key-Id": "<api-key>",
"X-Access-Key-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Access-Key-Id': '<api-key>',
'X-Access-Key-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({cancel_note: '<string>'})
};
fetch('https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel', 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://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel",
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([
'cancel_note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Key-Id: <api-key>",
"X-Access-Key-Secret: <api-key>"
],
]);
$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://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel"
payload := strings.NewReader("{\n \"cancel_note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Key-Id", "<api-key>")
req.Header.Add("X-Access-Key-Secret", "<api-key>")
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://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel")
.header("X-Access-Key-Id", "<api-key>")
.header("X-Access-Key-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cancel_note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Key-Id"] = '<api-key>'
request["X-Access-Key-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cancel_note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"id": 123,
"calendar_id": 123,
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"attendees": [
{
"email": "jsmith@example.com",
"name": "<string>",
"is_organizer": true,
"customer_id": 123,
"calendar_id": 123
}
],
"body": "<string>",
"location": "<string>",
"cancel_note": "<string>",
"canceled_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"public_id": "<string>",
"provider_event_id": "<string>",
"customer_id": 123,
"meeting_link_id": 123,
"online_conference": {
"id": 123,
"online_conference_account_id": 123,
"public_id": "<string>",
"title": "<string>",
"is_public": true,
"deleted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"backer_event_id": 123,
"is_occurred": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}
}
}"Invalid or missing access key.""Resource object does not exist.""Too many requests.""An unexpected error occurred."Events
Cancel Event
Required permissions: events.delete.*
POST
/
calendars
/
{calendar_id}
/
events
/
{event_id}
/
cancel
Cancel Event
curl --request POST \
--url https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel \
--header 'Content-Type: application/json' \
--header 'X-Access-Key-Id: <api-key>' \
--header 'X-Access-Key-Secret: <api-key>' \
--data '
{
"cancel_note": "<string>"
}
'import requests
url = "https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel"
payload = { "cancel_note": "<string>" }
headers = {
"X-Access-Key-Id": "<api-key>",
"X-Access-Key-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Access-Key-Id': '<api-key>',
'X-Access-Key-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({cancel_note: '<string>'})
};
fetch('https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel', 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://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel",
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([
'cancel_note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Key-Id: <api-key>",
"X-Access-Key-Secret: <api-key>"
],
]);
$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://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel"
payload := strings.NewReader("{\n \"cancel_note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Key-Id", "<api-key>")
req.Header.Add("X-Access-Key-Secret", "<api-key>")
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://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel")
.header("X-Access-Key-Id", "<api-key>")
.header("X-Access-Key-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cancel_note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events/{event_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Key-Id"] = '<api-key>'
request["X-Access-Key-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cancel_note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"id": 123,
"calendar_id": 123,
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"attendees": [
{
"email": "jsmith@example.com",
"name": "<string>",
"is_organizer": true,
"customer_id": 123,
"calendar_id": 123
}
],
"body": "<string>",
"location": "<string>",
"cancel_note": "<string>",
"canceled_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"public_id": "<string>",
"provider_event_id": "<string>",
"customer_id": 123,
"meeting_link_id": 123,
"online_conference": {
"id": 123,
"online_conference_account_id": 123,
"public_id": "<string>",
"title": "<string>",
"is_public": true,
"deleted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"backer_event_id": 123,
"is_occurred": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}
}
}"Invalid or missing access key.""Resource object does not exist.""Too many requests.""An unexpected error occurred."⌘I