Calendar
Update Calendar Event
Partially updates a Task or Appointment. Only non-empty fields in the request body are applied; omitted fields keep their current values.
Notes:
- calendarId must be the composite string returned by POST /v2.0/calendar (e.g. ‘12345-task’ or ‘12345-appointment’). Invalid format returns 400.
- When startAt or endAt is supplied, it must be later than the current server time.
PUT
/
v2.0
/
calendar
/
{calendarId}
Update Calendar Event
curl --request PUT \
--url https://api.lofty.com/v2.0/calendar/{calendarId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"content": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"startAtMs": 123,
"endAtMs": 123,
"timeZoneCode": "<string>",
"reminderType": "<string>",
"reminderTime": "<string>",
"leadId": 123,
"address": "<string>",
"assignedRoleId": 10,
"ownerUserId": 844775556213479,
"participants": {
"agents": [
844775556213479
],
"leads": [
1149834734607512
]
}
}
'import requests
url = "https://api.lofty.com/v2.0/calendar/{calendarId}"
payload = {
"content": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"startAtMs": 123,
"endAtMs": 123,
"timeZoneCode": "<string>",
"reminderType": "<string>",
"reminderTime": "<string>",
"leadId": 123,
"address": "<string>",
"assignedRoleId": 10,
"ownerUserId": 844775556213479,
"participants": {
"agents": [844775556213479],
"leads": [1149834734607512]
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
content: '<string>',
startAt: '<string>',
endAt: '<string>',
startAtMs: 123,
endAtMs: 123,
timeZoneCode: '<string>',
reminderType: '<string>',
reminderTime: '<string>',
leadId: 123,
address: '<string>',
assignedRoleId: 10,
ownerUserId: 844775556213479,
participants: {agents: [844775556213479], leads: [1149834734607512]}
})
};
fetch('https://api.lofty.com/v2.0/calendar/{calendarId}', 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.lofty.com/v2.0/calendar/{calendarId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'startAt' => '<string>',
'endAt' => '<string>',
'startAtMs' => 123,
'endAtMs' => 123,
'timeZoneCode' => '<string>',
'reminderType' => '<string>',
'reminderTime' => '<string>',
'leadId' => 123,
'address' => '<string>',
'assignedRoleId' => 10,
'ownerUserId' => 844775556213479,
'participants' => [
'agents' => [
844775556213479
],
'leads' => [
1149834734607512
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.lofty.com/v2.0/calendar/{calendarId}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"startAt\": \"<string>\",\n \"endAt\": \"<string>\",\n \"startAtMs\": 123,\n \"endAtMs\": 123,\n \"timeZoneCode\": \"<string>\",\n \"reminderType\": \"<string>\",\n \"reminderTime\": \"<string>\",\n \"leadId\": 123,\n \"address\": \"<string>\",\n \"assignedRoleId\": 10,\n \"ownerUserId\": 844775556213479,\n \"participants\": {\n \"agents\": [\n 844775556213479\n ],\n \"leads\": [\n 1149834734607512\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lofty.com/v2.0/calendar/{calendarId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"content\": \"<string>\",\n \"startAt\": \"<string>\",\n \"endAt\": \"<string>\",\n \"startAtMs\": 123,\n \"endAtMs\": 123,\n \"timeZoneCode\": \"<string>\",\n \"reminderType\": \"<string>\",\n \"reminderTime\": \"<string>\",\n \"leadId\": 123,\n \"address\": \"<string>\",\n \"assignedRoleId\": 10,\n \"ownerUserId\": 844775556213479,\n \"participants\": {\n \"agents\": [\n 844775556213479\n ],\n \"leads\": [\n 1149834734607512\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/calendar/{calendarId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"content\": \"<string>\",\n \"startAt\": \"<string>\",\n \"endAt\": \"<string>\",\n \"startAtMs\": 123,\n \"endAtMs\": 123,\n \"timeZoneCode\": \"<string>\",\n \"reminderType\": \"<string>\",\n \"reminderTime\": \"<string>\",\n \"leadId\": 123,\n \"address\": \"<string>\",\n \"assignedRoleId\": 10,\n \"ownerUserId\": 844775556213479,\n \"participants\": {\n \"agents\": [\n 844775556213479\n ],\n \"leads\": [\n 1149834734607512\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Calendar updated successfully"
}"<string>""<string>""<string>"Path Parameters
Body
application/json
Partial update payload; only non-empty fields are applied.
⌘I
Update Calendar Event
curl --request PUT \
--url https://api.lofty.com/v2.0/calendar/{calendarId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"content": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"startAtMs": 123,
"endAtMs": 123,
"timeZoneCode": "<string>",
"reminderType": "<string>",
"reminderTime": "<string>",
"leadId": 123,
"address": "<string>",
"assignedRoleId": 10,
"ownerUserId": 844775556213479,
"participants": {
"agents": [
844775556213479
],
"leads": [
1149834734607512
]
}
}
'import requests
url = "https://api.lofty.com/v2.0/calendar/{calendarId}"
payload = {
"content": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"startAtMs": 123,
"endAtMs": 123,
"timeZoneCode": "<string>",
"reminderType": "<string>",
"reminderTime": "<string>",
"leadId": 123,
"address": "<string>",
"assignedRoleId": 10,
"ownerUserId": 844775556213479,
"participants": {
"agents": [844775556213479],
"leads": [1149834734607512]
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
content: '<string>',
startAt: '<string>',
endAt: '<string>',
startAtMs: 123,
endAtMs: 123,
timeZoneCode: '<string>',
reminderType: '<string>',
reminderTime: '<string>',
leadId: 123,
address: '<string>',
assignedRoleId: 10,
ownerUserId: 844775556213479,
participants: {agents: [844775556213479], leads: [1149834734607512]}
})
};
fetch('https://api.lofty.com/v2.0/calendar/{calendarId}', 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.lofty.com/v2.0/calendar/{calendarId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'startAt' => '<string>',
'endAt' => '<string>',
'startAtMs' => 123,
'endAtMs' => 123,
'timeZoneCode' => '<string>',
'reminderType' => '<string>',
'reminderTime' => '<string>',
'leadId' => 123,
'address' => '<string>',
'assignedRoleId' => 10,
'ownerUserId' => 844775556213479,
'participants' => [
'agents' => [
844775556213479
],
'leads' => [
1149834734607512
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.lofty.com/v2.0/calendar/{calendarId}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"startAt\": \"<string>\",\n \"endAt\": \"<string>\",\n \"startAtMs\": 123,\n \"endAtMs\": 123,\n \"timeZoneCode\": \"<string>\",\n \"reminderType\": \"<string>\",\n \"reminderTime\": \"<string>\",\n \"leadId\": 123,\n \"address\": \"<string>\",\n \"assignedRoleId\": 10,\n \"ownerUserId\": 844775556213479,\n \"participants\": {\n \"agents\": [\n 844775556213479\n ],\n \"leads\": [\n 1149834734607512\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lofty.com/v2.0/calendar/{calendarId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"content\": \"<string>\",\n \"startAt\": \"<string>\",\n \"endAt\": \"<string>\",\n \"startAtMs\": 123,\n \"endAtMs\": 123,\n \"timeZoneCode\": \"<string>\",\n \"reminderType\": \"<string>\",\n \"reminderTime\": \"<string>\",\n \"leadId\": 123,\n \"address\": \"<string>\",\n \"assignedRoleId\": 10,\n \"ownerUserId\": 844775556213479,\n \"participants\": {\n \"agents\": [\n 844775556213479\n ],\n \"leads\": [\n 1149834734607512\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/calendar/{calendarId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"content\": \"<string>\",\n \"startAt\": \"<string>\",\n \"endAt\": \"<string>\",\n \"startAtMs\": 123,\n \"endAtMs\": 123,\n \"timeZoneCode\": \"<string>\",\n \"reminderType\": \"<string>\",\n \"reminderTime\": \"<string>\",\n \"leadId\": 123,\n \"address\": \"<string>\",\n \"assignedRoleId\": 10,\n \"ownerUserId\": 844775556213479,\n \"participants\": {\n \"agents\": [\n 844775556213479\n ],\n \"leads\": [\n 1149834734607512\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Calendar updated successfully"
}"<string>""<string>""<string>"