Update an event type
curl --request PATCH \
--url https://api.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"slug": "<string>",
"lengthInMinutes": 123,
"description": "<string>",
"locations": [
{
"type": "integration",
"integration": "<string>"
}
],
"bookingFields": [
{
"type": "<string>",
"slug": "<string>",
"label": "<string>",
"required": true,
"placeholder": "<string>",
"options": [
"<string>"
],
"hidden": true,
"disableOnPrefill": true
}
],
"disableGuests": true,
"slotInterval": 123,
"minimumBookingNotice": 1,
"beforeEventBuffer": 1,
"afterEventBuffer": 1,
"scheduleId": 123,
"hidden": true,
"requiresConfirmation": true,
"successRedirectUrl": "<string>",
"customName": "<string>",
"lengthInMinutesOptions": [
123
]
}
'import requests
url = "https://api.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}"
payload = {
"title": "<string>",
"slug": "<string>",
"lengthInMinutes": 123,
"description": "<string>",
"locations": [
{
"type": "integration",
"integration": "<string>"
}
],
"bookingFields": [
{
"type": "<string>",
"slug": "<string>",
"label": "<string>",
"required": True,
"placeholder": "<string>",
"options": ["<string>"],
"hidden": True,
"disableOnPrefill": True
}
],
"disableGuests": True,
"slotInterval": 123,
"minimumBookingNotice": 1,
"beforeEventBuffer": 1,
"afterEventBuffer": 1,
"scheduleId": 123,
"hidden": True,
"requiresConfirmation": True,
"successRedirectUrl": "<string>",
"customName": "<string>",
"lengthInMinutesOptions": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
slug: '<string>',
lengthInMinutes: 123,
description: '<string>',
locations: [{type: 'integration', integration: '<string>'}],
bookingFields: [
{
type: '<string>',
slug: '<string>',
label: '<string>',
required: true,
placeholder: '<string>',
options: ['<string>'],
hidden: true,
disableOnPrefill: true
}
],
disableGuests: true,
slotInterval: 123,
minimumBookingNotice: 1,
beforeEventBuffer: 1,
afterEventBuffer: 1,
scheduleId: 123,
hidden: true,
requiresConfirmation: true,
successRedirectUrl: '<string>',
customName: '<string>',
lengthInMinutesOptions: [123]
})
};
fetch('https://api.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}', 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.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}",
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' => '<string>',
'slug' => '<string>',
'lengthInMinutes' => 123,
'description' => '<string>',
'locations' => [
[
'type' => 'integration',
'integration' => '<string>'
]
],
'bookingFields' => [
[
'type' => '<string>',
'slug' => '<string>',
'label' => '<string>',
'required' => true,
'placeholder' => '<string>',
'options' => [
'<string>'
],
'hidden' => true,
'disableOnPrefill' => true
]
],
'disableGuests' => true,
'slotInterval' => 123,
'minimumBookingNotice' => 1,
'beforeEventBuffer' => 1,
'afterEventBuffer' => 1,
'scheduleId' => 123,
'hidden' => true,
'requiresConfirmation' => true,
'successRedirectUrl' => '<string>',
'customName' => '<string>',
'lengthInMinutesOptions' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"lengthInMinutes\": 123,\n \"description\": \"<string>\",\n \"locations\": [\n {\n \"type\": \"integration\",\n \"integration\": \"<string>\"\n }\n ],\n \"bookingFields\": [\n {\n \"type\": \"<string>\",\n \"slug\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"hidden\": true,\n \"disableOnPrefill\": true\n }\n ],\n \"disableGuests\": true,\n \"slotInterval\": 123,\n \"minimumBookingNotice\": 1,\n \"beforeEventBuffer\": 1,\n \"afterEventBuffer\": 1,\n \"scheduleId\": 123,\n \"hidden\": true,\n \"requiresConfirmation\": true,\n \"successRedirectUrl\": \"<string>\",\n \"customName\": \"<string>\",\n \"lengthInMinutesOptions\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"lengthInMinutes\": 123,\n \"description\": \"<string>\",\n \"locations\": [\n {\n \"type\": \"integration\",\n \"integration\": \"<string>\"\n }\n ],\n \"bookingFields\": [\n {\n \"type\": \"<string>\",\n \"slug\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"hidden\": true,\n \"disableOnPrefill\": true\n }\n ],\n \"disableGuests\": true,\n \"slotInterval\": 123,\n \"minimumBookingNotice\": 1,\n \"beforeEventBuffer\": 1,\n \"afterEventBuffer\": 1,\n \"scheduleId\": 123,\n \"hidden\": true,\n \"requiresConfirmation\": true,\n \"successRedirectUrl\": \"<string>\",\n \"customName\": \"<string>\",\n \"lengthInMinutesOptions\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"lengthInMinutes\": 123,\n \"description\": \"<string>\",\n \"locations\": [\n {\n \"type\": \"integration\",\n \"integration\": \"<string>\"\n }\n ],\n \"bookingFields\": [\n {\n \"type\": \"<string>\",\n \"slug\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"hidden\": true,\n \"disableOnPrefill\": true\n }\n ],\n \"disableGuests\": true,\n \"slotInterval\": 123,\n \"minimumBookingNotice\": 1,\n \"beforeEventBuffer\": 1,\n \"afterEventBuffer\": 1,\n \"scheduleId\": 123,\n \"hidden\": true,\n \"requiresConfirmation\": true,\n \"successRedirectUrl\": \"<string>\",\n \"customName\": \"<string>\",\n \"lengthInMinutesOptions\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"eventType": {
"id": 123,
"slug": "<string>",
"title": "<string>",
"description": "<string>",
"lengthInMinutes": 1,
"lengthInMinutesOptions": [
123
],
"hidden": true,
"locations": [
{
"type": "integration",
"integration": "<string>"
}
],
"bookingFields": [
{
"type": "<string>",
"slug": "<string>",
"label": "<string>",
"required": true,
"placeholder": "<string>",
"options": [
"<string>"
],
"hidden": true,
"disableOnPrefill": true
}
],
"disableGuests": true,
"slotInterval": 123,
"minimumBookingNotice": 123,
"beforeEventBuffer": 123,
"afterEventBuffer": 123,
"scheduleId": 123,
"requiresConfirmation": true,
"successRedirectUrl": "<string>",
"customName": "<string>"
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Calendar
Update an event type
Partially update an event type. Any field omitted is left unchanged. Emits calendar.event_type.updated.
PATCH
/
projects
/
{projectId}
/
calendar
/
event-types
/
{eventTypeId}
Update an event type
curl --request PATCH \
--url https://api.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"slug": "<string>",
"lengthInMinutes": 123,
"description": "<string>",
"locations": [
{
"type": "integration",
"integration": "<string>"
}
],
"bookingFields": [
{
"type": "<string>",
"slug": "<string>",
"label": "<string>",
"required": true,
"placeholder": "<string>",
"options": [
"<string>"
],
"hidden": true,
"disableOnPrefill": true
}
],
"disableGuests": true,
"slotInterval": 123,
"minimumBookingNotice": 1,
"beforeEventBuffer": 1,
"afterEventBuffer": 1,
"scheduleId": 123,
"hidden": true,
"requiresConfirmation": true,
"successRedirectUrl": "<string>",
"customName": "<string>",
"lengthInMinutesOptions": [
123
]
}
'import requests
url = "https://api.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}"
payload = {
"title": "<string>",
"slug": "<string>",
"lengthInMinutes": 123,
"description": "<string>",
"locations": [
{
"type": "integration",
"integration": "<string>"
}
],
"bookingFields": [
{
"type": "<string>",
"slug": "<string>",
"label": "<string>",
"required": True,
"placeholder": "<string>",
"options": ["<string>"],
"hidden": True,
"disableOnPrefill": True
}
],
"disableGuests": True,
"slotInterval": 123,
"minimumBookingNotice": 1,
"beforeEventBuffer": 1,
"afterEventBuffer": 1,
"scheduleId": 123,
"hidden": True,
"requiresConfirmation": True,
"successRedirectUrl": "<string>",
"customName": "<string>",
"lengthInMinutesOptions": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
slug: '<string>',
lengthInMinutes: 123,
description: '<string>',
locations: [{type: 'integration', integration: '<string>'}],
bookingFields: [
{
type: '<string>',
slug: '<string>',
label: '<string>',
required: true,
placeholder: '<string>',
options: ['<string>'],
hidden: true,
disableOnPrefill: true
}
],
disableGuests: true,
slotInterval: 123,
minimumBookingNotice: 1,
beforeEventBuffer: 1,
afterEventBuffer: 1,
scheduleId: 123,
hidden: true,
requiresConfirmation: true,
successRedirectUrl: '<string>',
customName: '<string>',
lengthInMinutesOptions: [123]
})
};
fetch('https://api.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}', 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.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}",
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' => '<string>',
'slug' => '<string>',
'lengthInMinutes' => 123,
'description' => '<string>',
'locations' => [
[
'type' => 'integration',
'integration' => '<string>'
]
],
'bookingFields' => [
[
'type' => '<string>',
'slug' => '<string>',
'label' => '<string>',
'required' => true,
'placeholder' => '<string>',
'options' => [
'<string>'
],
'hidden' => true,
'disableOnPrefill' => true
]
],
'disableGuests' => true,
'slotInterval' => 123,
'minimumBookingNotice' => 1,
'beforeEventBuffer' => 1,
'afterEventBuffer' => 1,
'scheduleId' => 123,
'hidden' => true,
'requiresConfirmation' => true,
'successRedirectUrl' => '<string>',
'customName' => '<string>',
'lengthInMinutesOptions' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"lengthInMinutes\": 123,\n \"description\": \"<string>\",\n \"locations\": [\n {\n \"type\": \"integration\",\n \"integration\": \"<string>\"\n }\n ],\n \"bookingFields\": [\n {\n \"type\": \"<string>\",\n \"slug\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"hidden\": true,\n \"disableOnPrefill\": true\n }\n ],\n \"disableGuests\": true,\n \"slotInterval\": 123,\n \"minimumBookingNotice\": 1,\n \"beforeEventBuffer\": 1,\n \"afterEventBuffer\": 1,\n \"scheduleId\": 123,\n \"hidden\": true,\n \"requiresConfirmation\": true,\n \"successRedirectUrl\": \"<string>\",\n \"customName\": \"<string>\",\n \"lengthInMinutesOptions\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"lengthInMinutes\": 123,\n \"description\": \"<string>\",\n \"locations\": [\n {\n \"type\": \"integration\",\n \"integration\": \"<string>\"\n }\n ],\n \"bookingFields\": [\n {\n \"type\": \"<string>\",\n \"slug\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"hidden\": true,\n \"disableOnPrefill\": true\n }\n ],\n \"disableGuests\": true,\n \"slotInterval\": 123,\n \"minimumBookingNotice\": 1,\n \"beforeEventBuffer\": 1,\n \"afterEventBuffer\": 1,\n \"scheduleId\": 123,\n \"hidden\": true,\n \"requiresConfirmation\": true,\n \"successRedirectUrl\": \"<string>\",\n \"customName\": \"<string>\",\n \"lengthInMinutesOptions\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sapt.ai/projects/{projectId}/calendar/event-types/{eventTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"lengthInMinutes\": 123,\n \"description\": \"<string>\",\n \"locations\": [\n {\n \"type\": \"integration\",\n \"integration\": \"<string>\"\n }\n ],\n \"bookingFields\": [\n {\n \"type\": \"<string>\",\n \"slug\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"hidden\": true,\n \"disableOnPrefill\": true\n }\n ],\n \"disableGuests\": true,\n \"slotInterval\": 123,\n \"minimumBookingNotice\": 1,\n \"beforeEventBuffer\": 1,\n \"afterEventBuffer\": 1,\n \"scheduleId\": 123,\n \"hidden\": true,\n \"requiresConfirmation\": true,\n \"successRedirectUrl\": \"<string>\",\n \"customName\": \"<string>\",\n \"lengthInMinutesOptions\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"eventType": {
"id": 123,
"slug": "<string>",
"title": "<string>",
"description": "<string>",
"lengthInMinutes": 1,
"lengthInMinutesOptions": [
123
],
"hidden": true,
"locations": [
{
"type": "integration",
"integration": "<string>"
}
],
"bookingFields": [
{
"type": "<string>",
"slug": "<string>",
"label": "<string>",
"required": true,
"placeholder": "<string>",
"options": [
"<string>"
],
"hidden": true,
"disableOnPrefill": true
}
],
"disableGuests": true,
"slotInterval": 123,
"minimumBookingNotice": 123,
"beforeEventBuffer": 123,
"afterEventBuffer": 123,
"scheduleId": 123,
"requiresConfirmation": true,
"successRedirectUrl": "<string>",
"customName": "<string>"
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
JWT token obtained from /api/auth/token endpoint. Token is verified using JWKS and must include a valid user identifier.
Body
application/json
Minimum string length:
1Minimum string length:
1- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Response
Success
Show child attributes
Show child attributes