Update a Gratona-created calendar event
Requires email/calendar deployment availability and the route permissions. Connected account operations use the authenticated tenant and mailbox owner; body/metadata sharing remains separately authorized. Only the connected owner can update an event created from Gratona. Submitted end/start values must remain ordered; provider write failures return422.
curl --request PATCH \
--url https://api.gratona.com/v1/email-calendar/events/{event_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"location": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"attendee_email": "jsmith@example.com",
"send_updates": true,
"reminder_minutes": 20160
}
'import requests
url = "https://api.gratona.com/v1/email-calendar/events/{event_id}"
payload = {
"title": "<string>",
"description": "<string>",
"location": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"attendee_email": "jsmith@example.com",
"send_updates": True,
"reminder_minutes": 20160
}
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>',
description: '<string>',
location: '<string>',
start_at: '2023-11-07T05:31:56Z',
end_at: '2023-11-07T05:31:56Z',
timezone: '<string>',
attendee_email: 'jsmith@example.com',
send_updates: true,
reminder_minutes: 20160
})
};
fetch('https://api.gratona.com/v1/email-calendar/events/{event_id}', 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.gratona.com/v1/email-calendar/events/{event_id}",
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>',
'description' => '<string>',
'location' => '<string>',
'start_at' => '2023-11-07T05:31:56Z',
'end_at' => '2023-11-07T05:31:56Z',
'timezone' => '<string>',
'attendee_email' => 'jsmith@example.com',
'send_updates' => true,
'reminder_minutes' => 20160
]),
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.gratona.com/v1/email-calendar/events/{event_id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"attendee_email\": \"jsmith@example.com\",\n \"send_updates\": true,\n \"reminder_minutes\": 20160\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.gratona.com/v1/email-calendar/events/{event_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"attendee_email\": \"jsmith@example.com\",\n \"send_updates\": true,\n \"reminder_minutes\": 20160\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/email-calendar/events/{event_id}")
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 \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"attendee_email\": \"jsmith@example.com\",\n \"send_updates\": true,\n \"reminder_minutes\": 20160\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"email_calendar_account_id": 123,
"provider": "<string>",
"provider_event_id": "<string>",
"title": "<string>",
"description_plain": "<string>",
"location": "<string>",
"organizer_email": "<string>",
"organizer_name": "<string>",
"meeting_url": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"status": "<string>",
"visibility": "<string>",
"can_update": true,
"attendees": [
{}
],
"provider_metadata": {}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Event id.
Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Validation: string|max:255.
255Validation: nullable|string|max:10000.
10000Validation: nullable|string|max:255.
255Validation: date.
Validation: date.
Valid IANA timezone, excluding Factory.
64Validation: nullable|email.
Validation: nullable|boolean.
Validation: nullable|integer|min:0|max:40320.
0 <= x <= 40320Response
Update a Gratona-created calendar event response.
Show child attributes
Show child attributes
curl --request PATCH \
--url https://api.gratona.com/v1/email-calendar/events/{event_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"location": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"attendee_email": "jsmith@example.com",
"send_updates": true,
"reminder_minutes": 20160
}
'import requests
url = "https://api.gratona.com/v1/email-calendar/events/{event_id}"
payload = {
"title": "<string>",
"description": "<string>",
"location": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"attendee_email": "jsmith@example.com",
"send_updates": True,
"reminder_minutes": 20160
}
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>',
description: '<string>',
location: '<string>',
start_at: '2023-11-07T05:31:56Z',
end_at: '2023-11-07T05:31:56Z',
timezone: '<string>',
attendee_email: 'jsmith@example.com',
send_updates: true,
reminder_minutes: 20160
})
};
fetch('https://api.gratona.com/v1/email-calendar/events/{event_id}', 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.gratona.com/v1/email-calendar/events/{event_id}",
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>',
'description' => '<string>',
'location' => '<string>',
'start_at' => '2023-11-07T05:31:56Z',
'end_at' => '2023-11-07T05:31:56Z',
'timezone' => '<string>',
'attendee_email' => 'jsmith@example.com',
'send_updates' => true,
'reminder_minutes' => 20160
]),
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.gratona.com/v1/email-calendar/events/{event_id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"attendee_email\": \"jsmith@example.com\",\n \"send_updates\": true,\n \"reminder_minutes\": 20160\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.gratona.com/v1/email-calendar/events/{event_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"attendee_email\": \"jsmith@example.com\",\n \"send_updates\": true,\n \"reminder_minutes\": 20160\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/email-calendar/events/{event_id}")
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 \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"attendee_email\": \"jsmith@example.com\",\n \"send_updates\": true,\n \"reminder_minutes\": 20160\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"email_calendar_account_id": 123,
"provider": "<string>",
"provider_event_id": "<string>",
"title": "<string>",
"description_plain": "<string>",
"location": "<string>",
"organizer_email": "<string>",
"organizer_name": "<string>",
"meeting_url": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"status": "<string>",
"visibility": "<string>",
"can_update": true,
"attendees": [
{}
],
"provider_metadata": {}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}