curl --request PATCH \
--url https://api.cal.com/v2/events/{uuid} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Team offsite",
"endTime": "2030-01-01T11:00:00.000Z",
"timeZone": "Europe/Berlin",
"description": {},
"paymentTimeoutMinutes": {},
"background": {
"colors": [
"#0b1c2c",
"#1f6feb",
"#a5d8ff"
]
},
"lineup": {
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [
{
"url": "<string>"
}
],
"media": [
{
"url": "<string>",
"label": "<string>"
}
]
}
],
"title": "<string>"
},
"schedule": [
{
"content": "<string>",
"startTime": "2030-01-01T10:10:00.000Z",
"endTime": "2030-01-01T10:40:00.000Z",
"timeLabel": "<string>",
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [
{
"url": "<string>"
}
]
}
]
}
],
"registrationFields": [
{
"field": "name",
"variant": "fullName",
"slug": "name",
"label": "<string>",
"placeholder": "<string>",
"disableOnPrefill": true
}
],
"hosts": [
{
"userId": 123
}
],
"liveStreams": [
{
"url": "<string>"
}
],
"startTime": "2030-01-01T10:00:00.000Z",
"slug": "team-offsite-2030",
"capacity": 50000.5,
"waitlistEnabled": true,
"requiresApproval": true,
"showOrganizerEmail": true,
"showPresentedBy": true
}
'import requests
url = "https://api.cal.com/v2/events/{uuid}"
payload = {
"title": "Team offsite",
"endTime": "2030-01-01T11:00:00.000Z",
"timeZone": "Europe/Berlin",
"description": {},
"paymentTimeoutMinutes": {},
"background": { "colors": ["#0b1c2c", "#1f6feb", "#a5d8ff"] },
"lineup": {
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [{ "url": "<string>" }],
"media": [
{
"url": "<string>",
"label": "<string>"
}
]
}
],
"title": "<string>"
},
"schedule": [
{
"content": "<string>",
"startTime": "2030-01-01T10:10:00.000Z",
"endTime": "2030-01-01T10:40:00.000Z",
"timeLabel": "<string>",
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [{ "url": "<string>" }]
}
]
}
],
"registrationFields": [
{
"field": "name",
"variant": "fullName",
"slug": "name",
"label": "<string>",
"placeholder": "<string>",
"disableOnPrefill": True
}
],
"hosts": [{ "userId": 123 }],
"liveStreams": [{ "url": "<string>" }],
"startTime": "2030-01-01T10:00:00.000Z",
"slug": "team-offsite-2030",
"capacity": 50000.5,
"waitlistEnabled": True,
"requiresApproval": True,
"showOrganizerEmail": True,
"showPresentedBy": True
}
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({
title: 'Team offsite',
endTime: '2030-01-01T11:00:00.000Z',
timeZone: 'Europe/Berlin',
description: {},
paymentTimeoutMinutes: {},
background: {colors: ['#0b1c2c', '#1f6feb', '#a5d8ff']},
lineup: {
people: [
{
name: '<string>',
role: '<string>',
avatarUrl: '<string>',
links: [{url: '<string>'}],
media: [{url: '<string>', label: '<string>'}]
}
],
title: '<string>'
},
schedule: [
{
content: '<string>',
startTime: '2030-01-01T10:10:00.000Z',
endTime: '2030-01-01T10:40:00.000Z',
timeLabel: '<string>',
people: [
{
name: '<string>',
role: '<string>',
avatarUrl: '<string>',
links: [{url: '<string>'}]
}
]
}
],
registrationFields: [
{
field: 'name',
variant: 'fullName',
slug: 'name',
label: '<string>',
placeholder: '<string>',
disableOnPrefill: true
}
],
hosts: [{userId: 123}],
liveStreams: [{url: '<string>'}],
startTime: '2030-01-01T10:00:00.000Z',
slug: 'team-offsite-2030',
capacity: 50000.5,
waitlistEnabled: true,
requiresApproval: true,
showOrganizerEmail: true,
showPresentedBy: true
})
};
fetch('https://api.cal.com/v2/events/{uuid}', 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}",
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([
'title' => 'Team offsite',
'endTime' => '2030-01-01T11:00:00.000Z',
'timeZone' => 'Europe/Berlin',
'description' => [
],
'paymentTimeoutMinutes' => [
],
'background' => [
'colors' => [
'#0b1c2c',
'#1f6feb',
'#a5d8ff'
]
],
'lineup' => [
'people' => [
[
'name' => '<string>',
'role' => '<string>',
'avatarUrl' => '<string>',
'links' => [
[
'url' => '<string>'
]
],
'media' => [
[
'url' => '<string>',
'label' => '<string>'
]
]
]
],
'title' => '<string>'
],
'schedule' => [
[
'content' => '<string>',
'startTime' => '2030-01-01T10:10:00.000Z',
'endTime' => '2030-01-01T10:40:00.000Z',
'timeLabel' => '<string>',
'people' => [
[
'name' => '<string>',
'role' => '<string>',
'avatarUrl' => '<string>',
'links' => [
[
'url' => '<string>'
]
]
]
]
]
],
'registrationFields' => [
[
'field' => 'name',
'variant' => 'fullName',
'slug' => 'name',
'label' => '<string>',
'placeholder' => '<string>',
'disableOnPrefill' => true
]
],
'hosts' => [
[
'userId' => 123
]
],
'liveStreams' => [
[
'url' => '<string>'
]
],
'startTime' => '2030-01-01T10:00:00.000Z',
'slug' => 'team-offsite-2030',
'capacity' => 50000.5,
'waitlistEnabled' => true,
'requiresApproval' => true,
'showOrganizerEmail' => true,
'showPresentedBy' => true
]),
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}"
payload := strings.NewReader("{\n \"title\": \"Team offsite\",\n \"endTime\": \"2030-01-01T11:00:00.000Z\",\n \"timeZone\": \"Europe/Berlin\",\n \"description\": {},\n \"paymentTimeoutMinutes\": {},\n \"background\": {\n \"colors\": [\n \"#0b1c2c\",\n \"#1f6feb\",\n \"#a5d8ff\"\n ]\n },\n \"lineup\": {\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n }\n ],\n \"title\": \"<string>\"\n },\n \"schedule\": [\n {\n \"content\": \"<string>\",\n \"startTime\": \"2030-01-01T10:10:00.000Z\",\n \"endTime\": \"2030-01-01T10:40:00.000Z\",\n \"timeLabel\": \"<string>\",\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ]\n }\n ]\n }\n ],\n \"registrationFields\": [\n {\n \"field\": \"name\",\n \"variant\": \"fullName\",\n \"slug\": \"name\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"disableOnPrefill\": true\n }\n ],\n \"hosts\": [\n {\n \"userId\": 123\n }\n ],\n \"liveStreams\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"startTime\": \"2030-01-01T10:00:00.000Z\",\n \"slug\": \"team-offsite-2030\",\n \"capacity\": 50000.5,\n \"waitlistEnabled\": true,\n \"requiresApproval\": true,\n \"showOrganizerEmail\": true,\n \"showPresentedBy\": true\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}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Team offsite\",\n \"endTime\": \"2030-01-01T11:00:00.000Z\",\n \"timeZone\": \"Europe/Berlin\",\n \"description\": {},\n \"paymentTimeoutMinutes\": {},\n \"background\": {\n \"colors\": [\n \"#0b1c2c\",\n \"#1f6feb\",\n \"#a5d8ff\"\n ]\n },\n \"lineup\": {\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n }\n ],\n \"title\": \"<string>\"\n },\n \"schedule\": [\n {\n \"content\": \"<string>\",\n \"startTime\": \"2030-01-01T10:10:00.000Z\",\n \"endTime\": \"2030-01-01T10:40:00.000Z\",\n \"timeLabel\": \"<string>\",\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ]\n }\n ]\n }\n ],\n \"registrationFields\": [\n {\n \"field\": \"name\",\n \"variant\": \"fullName\",\n \"slug\": \"name\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"disableOnPrefill\": true\n }\n ],\n \"hosts\": [\n {\n \"userId\": 123\n }\n ],\n \"liveStreams\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"startTime\": \"2030-01-01T10:00:00.000Z\",\n \"slug\": \"team-offsite-2030\",\n \"capacity\": 50000.5,\n \"waitlistEnabled\": true,\n \"requiresApproval\": true,\n \"showOrganizerEmail\": true,\n \"showPresentedBy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/events/{uuid}")
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 \"title\": \"Team offsite\",\n \"endTime\": \"2030-01-01T11:00:00.000Z\",\n \"timeZone\": \"Europe/Berlin\",\n \"description\": {},\n \"paymentTimeoutMinutes\": {},\n \"background\": {\n \"colors\": [\n \"#0b1c2c\",\n \"#1f6feb\",\n \"#a5d8ff\"\n ]\n },\n \"lineup\": {\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n }\n ],\n \"title\": \"<string>\"\n },\n \"schedule\": [\n {\n \"content\": \"<string>\",\n \"startTime\": \"2030-01-01T10:10:00.000Z\",\n \"endTime\": \"2030-01-01T10:40:00.000Z\",\n \"timeLabel\": \"<string>\",\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ]\n }\n ]\n }\n ],\n \"registrationFields\": [\n {\n \"field\": \"name\",\n \"variant\": \"fullName\",\n \"slug\": \"name\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"disableOnPrefill\": true\n }\n ],\n \"hosts\": [\n {\n \"userId\": 123\n }\n ],\n \"liveStreams\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"startTime\": \"2030-01-01T10:00:00.000Z\",\n \"slug\": \"team-offsite-2030\",\n \"capacity\": 50000.5,\n \"waitlistEnabled\": true,\n \"requiresApproval\": true,\n \"showOrganizerEmail\": true,\n \"showPresentedBy\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"uuid": "<string>",
"slug": "<string>",
"title": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"checkInOpensAt": "2023-11-07T05:31:56Z",
"checkInClosesAt": "2023-11-07T05:31:56Z",
"timeZone": "<string>",
"visibility": "PUBLIC",
"category": "meetup",
"hidden": true,
"status": "draft",
"locations": [
{
"id": "<string>",
"price": 2500,
"currency": "usd",
"type": "address",
"address": "123 Event Street",
"label": "<string>",
"capacity": 50000.5
}
],
"requiresApproval": true,
"waitlistEnabled": true,
"showOrganizerEmail": true,
"guestList": "hidden",
"showPresentedBy": true,
"liveStreams": [
{
"url": "<string>"
}
],
"registrationFields": [
{
"field": "name",
"slug": "name",
"variant": "fullName",
"disableOnPrefill": true,
"label": "<string>",
"placeholder": "<string>"
}
],
"hosts": [
{
"userId": 123,
"name": "Jane Doe",
"username": "jane",
"avatarUrl": "<string>"
}
],
"description": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"coverImageUrl": "<string>",
"paymentTimeoutMinutes": 123,
"confirmedCount": 123,
"theme": "light",
"poster": {
"layout": "date",
"palette": {
"background": "#0b1c2c",
"foreground": "#a5d8ff",
"accent": "#1f6feb"
},
"headline": "<string>",
"seed": 123
},
"lineup": {
"title": "<string>",
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [
{
"url": "<string>"
}
],
"media": [
{
"url": "<string>",
"label": "<string>"
}
]
}
]
},
"schedule": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"timeLabel": "<string>",
"content": "<string>",
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [
{
"url": "<string>"
}
]
}
]
}
],
"background": {
"effect": "aurora",
"colors": [
"<string>"
]
},
"capacity": 100,
"cancellationReason": "<string>",
"userId": 123,
"teamId": 123
}
}Update an Event
Updates the properties sent and leaves every other property as it is. Takes the same properties as POST /v2/events except locations, which have their own endpoints under /v2/events/{uuid}/locations.
hosts, liveStreams, registrationFields, lineup and schedule replace the whole stored list. lineup: null removes the lineup. Pass null to capacity for unlimited guests.
The slug and the guest list can’t change once the Event is published, and a cancelled Event can’t be updated. New times must keep every schedule item inside the Event. An accepted co-host can update the Event but not its hosts, slug or policies such as visibility, guestList or requiresApproval.
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. If accessed using an OAuth access token, the EVENT_WRITE scope is required.
curl --request PATCH \
--url https://api.cal.com/v2/events/{uuid} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Team offsite",
"endTime": "2030-01-01T11:00:00.000Z",
"timeZone": "Europe/Berlin",
"description": {},
"paymentTimeoutMinutes": {},
"background": {
"colors": [
"#0b1c2c",
"#1f6feb",
"#a5d8ff"
]
},
"lineup": {
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [
{
"url": "<string>"
}
],
"media": [
{
"url": "<string>",
"label": "<string>"
}
]
}
],
"title": "<string>"
},
"schedule": [
{
"content": "<string>",
"startTime": "2030-01-01T10:10:00.000Z",
"endTime": "2030-01-01T10:40:00.000Z",
"timeLabel": "<string>",
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [
{
"url": "<string>"
}
]
}
]
}
],
"registrationFields": [
{
"field": "name",
"variant": "fullName",
"slug": "name",
"label": "<string>",
"placeholder": "<string>",
"disableOnPrefill": true
}
],
"hosts": [
{
"userId": 123
}
],
"liveStreams": [
{
"url": "<string>"
}
],
"startTime": "2030-01-01T10:00:00.000Z",
"slug": "team-offsite-2030",
"capacity": 50000.5,
"waitlistEnabled": true,
"requiresApproval": true,
"showOrganizerEmail": true,
"showPresentedBy": true
}
'import requests
url = "https://api.cal.com/v2/events/{uuid}"
payload = {
"title": "Team offsite",
"endTime": "2030-01-01T11:00:00.000Z",
"timeZone": "Europe/Berlin",
"description": {},
"paymentTimeoutMinutes": {},
"background": { "colors": ["#0b1c2c", "#1f6feb", "#a5d8ff"] },
"lineup": {
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [{ "url": "<string>" }],
"media": [
{
"url": "<string>",
"label": "<string>"
}
]
}
],
"title": "<string>"
},
"schedule": [
{
"content": "<string>",
"startTime": "2030-01-01T10:10:00.000Z",
"endTime": "2030-01-01T10:40:00.000Z",
"timeLabel": "<string>",
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [{ "url": "<string>" }]
}
]
}
],
"registrationFields": [
{
"field": "name",
"variant": "fullName",
"slug": "name",
"label": "<string>",
"placeholder": "<string>",
"disableOnPrefill": True
}
],
"hosts": [{ "userId": 123 }],
"liveStreams": [{ "url": "<string>" }],
"startTime": "2030-01-01T10:00:00.000Z",
"slug": "team-offsite-2030",
"capacity": 50000.5,
"waitlistEnabled": True,
"requiresApproval": True,
"showOrganizerEmail": True,
"showPresentedBy": True
}
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({
title: 'Team offsite',
endTime: '2030-01-01T11:00:00.000Z',
timeZone: 'Europe/Berlin',
description: {},
paymentTimeoutMinutes: {},
background: {colors: ['#0b1c2c', '#1f6feb', '#a5d8ff']},
lineup: {
people: [
{
name: '<string>',
role: '<string>',
avatarUrl: '<string>',
links: [{url: '<string>'}],
media: [{url: '<string>', label: '<string>'}]
}
],
title: '<string>'
},
schedule: [
{
content: '<string>',
startTime: '2030-01-01T10:10:00.000Z',
endTime: '2030-01-01T10:40:00.000Z',
timeLabel: '<string>',
people: [
{
name: '<string>',
role: '<string>',
avatarUrl: '<string>',
links: [{url: '<string>'}]
}
]
}
],
registrationFields: [
{
field: 'name',
variant: 'fullName',
slug: 'name',
label: '<string>',
placeholder: '<string>',
disableOnPrefill: true
}
],
hosts: [{userId: 123}],
liveStreams: [{url: '<string>'}],
startTime: '2030-01-01T10:00:00.000Z',
slug: 'team-offsite-2030',
capacity: 50000.5,
waitlistEnabled: true,
requiresApproval: true,
showOrganizerEmail: true,
showPresentedBy: true
})
};
fetch('https://api.cal.com/v2/events/{uuid}', 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}",
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([
'title' => 'Team offsite',
'endTime' => '2030-01-01T11:00:00.000Z',
'timeZone' => 'Europe/Berlin',
'description' => [
],
'paymentTimeoutMinutes' => [
],
'background' => [
'colors' => [
'#0b1c2c',
'#1f6feb',
'#a5d8ff'
]
],
'lineup' => [
'people' => [
[
'name' => '<string>',
'role' => '<string>',
'avatarUrl' => '<string>',
'links' => [
[
'url' => '<string>'
]
],
'media' => [
[
'url' => '<string>',
'label' => '<string>'
]
]
]
],
'title' => '<string>'
],
'schedule' => [
[
'content' => '<string>',
'startTime' => '2030-01-01T10:10:00.000Z',
'endTime' => '2030-01-01T10:40:00.000Z',
'timeLabel' => '<string>',
'people' => [
[
'name' => '<string>',
'role' => '<string>',
'avatarUrl' => '<string>',
'links' => [
[
'url' => '<string>'
]
]
]
]
]
],
'registrationFields' => [
[
'field' => 'name',
'variant' => 'fullName',
'slug' => 'name',
'label' => '<string>',
'placeholder' => '<string>',
'disableOnPrefill' => true
]
],
'hosts' => [
[
'userId' => 123
]
],
'liveStreams' => [
[
'url' => '<string>'
]
],
'startTime' => '2030-01-01T10:00:00.000Z',
'slug' => 'team-offsite-2030',
'capacity' => 50000.5,
'waitlistEnabled' => true,
'requiresApproval' => true,
'showOrganizerEmail' => true,
'showPresentedBy' => true
]),
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}"
payload := strings.NewReader("{\n \"title\": \"Team offsite\",\n \"endTime\": \"2030-01-01T11:00:00.000Z\",\n \"timeZone\": \"Europe/Berlin\",\n \"description\": {},\n \"paymentTimeoutMinutes\": {},\n \"background\": {\n \"colors\": [\n \"#0b1c2c\",\n \"#1f6feb\",\n \"#a5d8ff\"\n ]\n },\n \"lineup\": {\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n }\n ],\n \"title\": \"<string>\"\n },\n \"schedule\": [\n {\n \"content\": \"<string>\",\n \"startTime\": \"2030-01-01T10:10:00.000Z\",\n \"endTime\": \"2030-01-01T10:40:00.000Z\",\n \"timeLabel\": \"<string>\",\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ]\n }\n ]\n }\n ],\n \"registrationFields\": [\n {\n \"field\": \"name\",\n \"variant\": \"fullName\",\n \"slug\": \"name\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"disableOnPrefill\": true\n }\n ],\n \"hosts\": [\n {\n \"userId\": 123\n }\n ],\n \"liveStreams\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"startTime\": \"2030-01-01T10:00:00.000Z\",\n \"slug\": \"team-offsite-2030\",\n \"capacity\": 50000.5,\n \"waitlistEnabled\": true,\n \"requiresApproval\": true,\n \"showOrganizerEmail\": true,\n \"showPresentedBy\": true\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}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Team offsite\",\n \"endTime\": \"2030-01-01T11:00:00.000Z\",\n \"timeZone\": \"Europe/Berlin\",\n \"description\": {},\n \"paymentTimeoutMinutes\": {},\n \"background\": {\n \"colors\": [\n \"#0b1c2c\",\n \"#1f6feb\",\n \"#a5d8ff\"\n ]\n },\n \"lineup\": {\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n }\n ],\n \"title\": \"<string>\"\n },\n \"schedule\": [\n {\n \"content\": \"<string>\",\n \"startTime\": \"2030-01-01T10:10:00.000Z\",\n \"endTime\": \"2030-01-01T10:40:00.000Z\",\n \"timeLabel\": \"<string>\",\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ]\n }\n ]\n }\n ],\n \"registrationFields\": [\n {\n \"field\": \"name\",\n \"variant\": \"fullName\",\n \"slug\": \"name\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"disableOnPrefill\": true\n }\n ],\n \"hosts\": [\n {\n \"userId\": 123\n }\n ],\n \"liveStreams\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"startTime\": \"2030-01-01T10:00:00.000Z\",\n \"slug\": \"team-offsite-2030\",\n \"capacity\": 50000.5,\n \"waitlistEnabled\": true,\n \"requiresApproval\": true,\n \"showOrganizerEmail\": true,\n \"showPresentedBy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/events/{uuid}")
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 \"title\": \"Team offsite\",\n \"endTime\": \"2030-01-01T11:00:00.000Z\",\n \"timeZone\": \"Europe/Berlin\",\n \"description\": {},\n \"paymentTimeoutMinutes\": {},\n \"background\": {\n \"colors\": [\n \"#0b1c2c\",\n \"#1f6feb\",\n \"#a5d8ff\"\n ]\n },\n \"lineup\": {\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n }\n ],\n \"title\": \"<string>\"\n },\n \"schedule\": [\n {\n \"content\": \"<string>\",\n \"startTime\": \"2030-01-01T10:10:00.000Z\",\n \"endTime\": \"2030-01-01T10:40:00.000Z\",\n \"timeLabel\": \"<string>\",\n \"people\": [\n {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"avatarUrl\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\"\n }\n ]\n }\n ]\n }\n ],\n \"registrationFields\": [\n {\n \"field\": \"name\",\n \"variant\": \"fullName\",\n \"slug\": \"name\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"disableOnPrefill\": true\n }\n ],\n \"hosts\": [\n {\n \"userId\": 123\n }\n ],\n \"liveStreams\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"startTime\": \"2030-01-01T10:00:00.000Z\",\n \"slug\": \"team-offsite-2030\",\n \"capacity\": 50000.5,\n \"waitlistEnabled\": true,\n \"requiresApproval\": true,\n \"showOrganizerEmail\": true,\n \"showPresentedBy\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"uuid": "<string>",
"slug": "<string>",
"title": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"checkInOpensAt": "2023-11-07T05:31:56Z",
"checkInClosesAt": "2023-11-07T05:31:56Z",
"timeZone": "<string>",
"visibility": "PUBLIC",
"category": "meetup",
"hidden": true,
"status": "draft",
"locations": [
{
"id": "<string>",
"price": 2500,
"currency": "usd",
"type": "address",
"address": "123 Event Street",
"label": "<string>",
"capacity": 50000.5
}
],
"requiresApproval": true,
"waitlistEnabled": true,
"showOrganizerEmail": true,
"guestList": "hidden",
"showPresentedBy": true,
"liveStreams": [
{
"url": "<string>"
}
],
"registrationFields": [
{
"field": "name",
"slug": "name",
"variant": "fullName",
"disableOnPrefill": true,
"label": "<string>",
"placeholder": "<string>"
}
],
"hosts": [
{
"userId": 123,
"name": "Jane Doe",
"username": "jane",
"avatarUrl": "<string>"
}
],
"description": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"coverImageUrl": "<string>",
"paymentTimeoutMinutes": 123,
"confirmedCount": 123,
"theme": "light",
"poster": {
"layout": "date",
"palette": {
"background": "#0b1c2c",
"foreground": "#a5d8ff",
"accent": "#1f6feb"
},
"headline": "<string>",
"seed": 123
},
"lineup": {
"title": "<string>",
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [
{
"url": "<string>"
}
],
"media": [
{
"url": "<string>",
"label": "<string>"
}
]
}
]
},
"schedule": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"timeLabel": "<string>",
"content": "<string>",
"people": [
{
"name": "<string>",
"role": "<string>",
"avatarUrl": "<string>",
"links": [
{
"url": "<string>"
}
]
}
]
}
],
"background": {
"effect": "aurora",
"colors": [
"<string>"
]
},
"capacity": 100,
"cancellationReason": "<string>",
"userId": 123,
"teamId": 123
}
}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
The Event's title.
1 - 255"Team offsite"
When the Event ends, in ISO 8601 format in UTC timezone. It must be after startTime.
"2030-01-01T11:00:00.000Z"
The IANA time zone the Event's times are shown in.
"Europe/Berlin"
What the Event is about, shown on its page.
How many minutes a guest's seat is held while they pay. null uses the default of 10 minutes.
Default theme of the event page. null follows the visitor's system setting.
light, dark Animated background of the event page.
Show child attributes
Show child attributes
Speakers or performers on the event page. Avatars need the Event uuid, so create people without avatarUrl and upload avatars with the person avatar endpoint afterwards.
Show child attributes
Show child attributes
Agenda on the event page. Each item has either a startTime or a timeLabel. Avatars need the Event uuid, so create people without avatarUrl and upload avatars with the person avatar endpoint afterwards.
50Show child attributes
Show child attributes
The questions guests answer when they register.
- Default Full Name
- Default Split Name
- Default Email
- Default Location
- Default Title
- Default Notes
- Default Guests
- Default Reschedule Reason
- Default Attendee Phone
- Workflow-added SMS Reminder
- Workflow-added AI Agent Phone
- Custom Email
- Custom Phone
- Custom Address
- Custom Short Text
- Custom Number
- Custom Long Text
- Custom Select
- Custom Multi-Select
- Custom Multiple Emails
- Custom Checkbox Group
- Custom Checkbox
- Custom Radio Group
- Custom URL
Show child attributes
Show child attributes
The Event's hosts. The creator is always a host and always listed first, even when not passed. Personal Events can only have the creator, so passing other ids returns a 400. On team Events every id must be an accepted team member, otherwise it returns a 400.
Show child attributes
Show child attributes
Links where people can watch the event live.
5Show child attributes
Show child attributes
When the Event starts, in ISO 8601 format in UTC timezone. It must be before endTime.
"2030-01-01T10:00:00.000Z"
Public page slug (cal.com/{slug}): 10-100 lowercase letters, digits and hyphens. It can't change once the Event is published.
"team-offsite-2030"
Once published: PUBLIC is listed on the owner's page, UNLISTED only opens from its link.
PUBLIC, UNLISTED The most guests the Event can take. Pass null for unlimited. Ignored once any location has its own capacity: the Event then takes the sum of the location capacities, or is unlimited if any location has none. It can't go below the number of confirmed guests.
1 <= x <= 100000Let guests join a waitlist when the Event is full. The waitlist only opens when the Event or the chosen location is full, so it only works when capacity is set on the Event or on a location.
Registrations wait for a host's approval.
Show the organizer's email to guests.
Who guests can see on the Event's page. names lists them, count shows how many, hidden shows neither. It can't change once the Event is published.
hidden, names, count Show who the Event is presented by.
What kind of event it is.
meetup, conference, music, sports Was this page helpful?