curl --request PATCH \
--url https://api.cal.com/v2/events/{uuid}/coordinates \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"latitude": 51.5092,
"longitude": -0.1278
}
'import requests
url = "https://api.cal.com/v2/events/{uuid}/coordinates"
payload = {
"latitude": 51.5092,
"longitude": -0.1278
}
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({latitude: 51.5092, longitude: -0.1278})
};
fetch('https://api.cal.com/v2/events/{uuid}/coordinates', 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}/coordinates",
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([
'latitude' => 51.5092,
'longitude' => -0.1278
]),
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}/coordinates"
payload := strings.NewReader("{\n \"latitude\": 51.5092,\n \"longitude\": -0.1278\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}/coordinates")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"latitude\": 51.5092,\n \"longitude\": -0.1278\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/events/{uuid}/coordinates")
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 \"latitude\": 51.5092,\n \"longitude\": -0.1278\n}"
response = http.request(request)
puts response.read_body{
"status": "success"
}Update an Event's coordinates
Moves where the Event’s address location sits on the map of its public page and re-renders the map.
The Event must have an address location. The coordinates must stay within 1 km of where the address geocodes to; coordinates within a few metres of it reset to the address.
The authenticated user must be its owner, one of its hosts, an accepted co-host, or a member of the owning team. PBAC permission for team events: calEvent.update. Learn more about API access control at https://cal.com/docs/api-reference/v2/access-control.
Rate limited to 5 requests per minute per API key or access token.
If accessed using an OAuth access token, the EVENT_WRITE scope is required.
curl --request PATCH \
--url https://api.cal.com/v2/events/{uuid}/coordinates \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"latitude": 51.5092,
"longitude": -0.1278
}
'import requests
url = "https://api.cal.com/v2/events/{uuid}/coordinates"
payload = {
"latitude": 51.5092,
"longitude": -0.1278
}
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({latitude: 51.5092, longitude: -0.1278})
};
fetch('https://api.cal.com/v2/events/{uuid}/coordinates', 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}/coordinates",
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([
'latitude' => 51.5092,
'longitude' => -0.1278
]),
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}/coordinates"
payload := strings.NewReader("{\n \"latitude\": 51.5092,\n \"longitude\": -0.1278\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}/coordinates")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"latitude\": 51.5092,\n \"longitude\": -0.1278\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/events/{uuid}/coordinates")
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 \"latitude\": 51.5092,\n \"longitude\": -0.1278\n}"
response = http.request(request)
puts response.read_body{
"status": "success"
}Headers
value must be Bearer <token> where <token> is api key prefixed with cal_, managed user access token, or OAuth access token
Path Parameters
Event UUID. Accepts the canonical UUID (e.g. 018ff5cd-6dc4-7d57-bcbc-374702ca8b38) or its short-uuid (Flickr Base58) form (e.g. 1cbZYoAFoJdwqN4tixezd5).
Body
Latitude of the Event's address location. Must stay within 1 km of the geocoded address.
-90 <= x <= 9051.5092
Longitude of the Event's address location. Must stay within 1 km of the geocoded address.
-180 <= x <= 180-0.1278
Response
success, error "success"
Was this page helpful?