curl --request PATCH \
--url https://api.cal.com/v2/events/{uuid}/locations/{locationId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "address",
"label": "<string>",
"price": 1500,
"currency": "usd",
"capacity": 50000.5,
"address": "1 Example Street, Berlin"
}
'import requests
url = "https://api.cal.com/v2/events/{uuid}/locations/{locationId}"
payload = {
"type": "address",
"label": "<string>",
"price": 1500,
"currency": "usd",
"capacity": 50000.5,
"address": "1 Example Street, Berlin"
}
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({
type: 'address',
label: '<string>',
price: 1500,
currency: 'usd',
capacity: 50000.5,
address: '1 Example Street, Berlin'
})
};
fetch('https://api.cal.com/v2/events/{uuid}/locations/{locationId}', 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/events/{uuid}/locations/{locationId}",
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([
'type' => 'address',
'label' => '<string>',
'price' => 1500,
'currency' => 'usd',
'capacity' => 50000.5,
'address' => '1 Example Street, Berlin'
]),
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/events/{uuid}/locations/{locationId}"
payload := strings.NewReader("{\n \"type\": \"address\",\n \"label\": \"<string>\",\n \"price\": 1500,\n \"currency\": \"usd\",\n \"capacity\": 50000.5,\n \"address\": \"1 Example Street, Berlin\"\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/events/{uuid}/locations/{locationId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"address\",\n \"label\": \"<string>\",\n \"price\": 1500,\n \"currency\": \"usd\",\n \"capacity\": 50000.5,\n \"address\": \"1 Example Street, Berlin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/events/{uuid}/locations/{locationId}")
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 \"type\": \"address\",\n \"label\": \"<string>\",\n \"price\": 1500,\n \"currency\": \"usd\",\n \"capacity\": 50000.5,\n \"address\": \"1 Example Street, Berlin\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "<string>",
"price": 2500,
"currency": "usd",
"type": "address",
"address": "123 Event Street",
"label": "<string>",
"capacity": 50000.5
}
}Edit an Event's location
Changes the fields sent and keeps the rest of the location, including its id. type is required and must match the stored location; to change it, delete the location and add a new one. Pass null for label, price or capacity to remove it. A location returned as type: "unknown" can’t be edited.
On a published Event, a location’s price and currency can’t change, and changing a location emails the guests. If the Event changes while the location is being saved, nothing is saved and 409 is returned.
The authenticated user must be its owner, one of its hosts, an accepted co-host, or a member of the owning team; an accepted co-host can’t change a price. PBAC permission for team events: calEvent.update. Learn more about API access control at https://cal.com/docs/api-reference/v2/access-control. If accessed using an OAuth access token, the EVENT_WRITE scope is required.
curl --request PATCH \
--url https://api.cal.com/v2/events/{uuid}/locations/{locationId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "address",
"label": "<string>",
"price": 1500,
"currency": "usd",
"capacity": 50000.5,
"address": "1 Example Street, Berlin"
}
'import requests
url = "https://api.cal.com/v2/events/{uuid}/locations/{locationId}"
payload = {
"type": "address",
"label": "<string>",
"price": 1500,
"currency": "usd",
"capacity": 50000.5,
"address": "1 Example Street, Berlin"
}
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({
type: 'address',
label: '<string>',
price: 1500,
currency: 'usd',
capacity: 50000.5,
address: '1 Example Street, Berlin'
})
};
fetch('https://api.cal.com/v2/events/{uuid}/locations/{locationId}', 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/events/{uuid}/locations/{locationId}",
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([
'type' => 'address',
'label' => '<string>',
'price' => 1500,
'currency' => 'usd',
'capacity' => 50000.5,
'address' => '1 Example Street, Berlin'
]),
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/events/{uuid}/locations/{locationId}"
payload := strings.NewReader("{\n \"type\": \"address\",\n \"label\": \"<string>\",\n \"price\": 1500,\n \"currency\": \"usd\",\n \"capacity\": 50000.5,\n \"address\": \"1 Example Street, Berlin\"\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/events/{uuid}/locations/{locationId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"address\",\n \"label\": \"<string>\",\n \"price\": 1500,\n \"currency\": \"usd\",\n \"capacity\": 50000.5,\n \"address\": \"1 Example Street, Berlin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/events/{uuid}/locations/{locationId}")
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 \"type\": \"address\",\n \"label\": \"<string>\",\n \"price\": 1500,\n \"currency\": \"usd\",\n \"capacity\": 50000.5,\n \"address\": \"1 Example Street, Berlin\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "<string>",
"price": 2500,
"currency": "usd",
"type": "address",
"address": "123 Event Street",
"label": "<string>",
"capacity": 50000.5
}
}Headers
Path Parameters
Body
- Address
- Link
- Integration
- Organizer Default App
Was this page helpful?