Update an event communication
Saves a communication template with normalized shortcodes, notification preferences and Message Manager approval metadata. Scheduled messages are later handled by the queue; only email is automatically delivered. Communications hold blocks scheduling. Relative schedules require a dated event and resolve in its timezone. The structured schedule must match legacy send_at when both are supplied. Requires events_manage.
curl --request PUT \
--url https://api.gratona.com/v1/admin/events/{eventId}/communications/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "Example",
"trigger": "Example",
"channel": "email",
"status": "draft",
"segment": "Example",
"subject": "Example",
"body": "Example",
"send_at": "2026-12-20T18:00:00Z",
"sent_at": "2026-12-20T18:00:00Z",
"metadata": {},
"schedule": {
"kind": "instant",
"localDatetime": "2026-12-19T18:00:00",
"timezone": "Africa/Kampala",
"offsetMinutes": 180,
"utcAt": "2026-12-19T15:00:00Z",
"source": "calendar",
"recommendationId": "recommendation-42"
}
}
'import requests
url = "https://api.gratona.com/v1/admin/events/{eventId}/communications/{id}"
payload = {
"type": "Example",
"trigger": "Example",
"channel": "email",
"status": "draft",
"segment": "Example",
"subject": "Example",
"body": "Example",
"send_at": "2026-12-20T18:00:00Z",
"sent_at": "2026-12-20T18:00:00Z",
"metadata": {},
"schedule": {
"kind": "instant",
"localDatetime": "2026-12-19T18:00:00",
"timezone": "Africa/Kampala",
"offsetMinutes": 180,
"utcAt": "2026-12-19T15:00:00Z",
"source": "calendar",
"recommendationId": "recommendation-42"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'Example',
trigger: 'Example',
channel: 'email',
status: 'draft',
segment: 'Example',
subject: 'Example',
body: JSON.stringify('Example'),
send_at: '2026-12-20T18:00:00Z',
sent_at: '2026-12-20T18:00:00Z',
metadata: {},
schedule: {
kind: 'instant',
localDatetime: '2026-12-19T18:00:00',
timezone: 'Africa/Kampala',
offsetMinutes: 180,
utcAt: '2026-12-19T15:00:00Z',
source: 'calendar',
recommendationId: 'recommendation-42'
}
})
};
fetch('https://api.gratona.com/v1/admin/events/{eventId}/communications/{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/admin/events/{eventId}/communications/{id}",
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([
'type' => 'Example',
'trigger' => 'Example',
'channel' => 'email',
'status' => 'draft',
'segment' => 'Example',
'subject' => 'Example',
'body' => 'Example',
'send_at' => '2026-12-20T18:00:00Z',
'sent_at' => '2026-12-20T18:00:00Z',
'metadata' => [
],
'schedule' => [
'kind' => 'instant',
'localDatetime' => '2026-12-19T18:00:00',
'timezone' => 'Africa/Kampala',
'offsetMinutes' => 180,
'utcAt' => '2026-12-19T15:00:00Z',
'source' => 'calendar',
'recommendationId' => 'recommendation-42'
]
]),
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/admin/events/{eventId}/communications/{id}"
payload := strings.NewReader("{\n \"type\": \"Example\",\n \"trigger\": \"Example\",\n \"channel\": \"email\",\n \"status\": \"draft\",\n \"segment\": \"Example\",\n \"subject\": \"Example\",\n \"body\": \"Example\",\n \"send_at\": \"2026-12-20T18:00:00Z\",\n \"sent_at\": \"2026-12-20T18:00:00Z\",\n \"metadata\": {},\n \"schedule\": {\n \"kind\": \"instant\",\n \"localDatetime\": \"2026-12-19T18:00:00\",\n \"timezone\": \"Africa/Kampala\",\n \"offsetMinutes\": 180,\n \"utcAt\": \"2026-12-19T15:00:00Z\",\n \"source\": \"calendar\",\n \"recommendationId\": \"recommendation-42\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.gratona.com/v1/admin/events/{eventId}/communications/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"Example\",\n \"trigger\": \"Example\",\n \"channel\": \"email\",\n \"status\": \"draft\",\n \"segment\": \"Example\",\n \"subject\": \"Example\",\n \"body\": \"Example\",\n \"send_at\": \"2026-12-20T18:00:00Z\",\n \"sent_at\": \"2026-12-20T18:00:00Z\",\n \"metadata\": {},\n \"schedule\": {\n \"kind\": \"instant\",\n \"localDatetime\": \"2026-12-19T18:00:00\",\n \"timezone\": \"Africa/Kampala\",\n \"offsetMinutes\": 180,\n \"utcAt\": \"2026-12-19T15:00:00Z\",\n \"source\": \"calendar\",\n \"recommendationId\": \"recommendation-42\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/events/{eventId}/communications/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"Example\",\n \"trigger\": \"Example\",\n \"channel\": \"email\",\n \"status\": \"draft\",\n \"segment\": \"Example\",\n \"subject\": \"Example\",\n \"body\": \"Example\",\n \"send_at\": \"2026-12-20T18:00:00Z\",\n \"sent_at\": \"2026-12-20T18:00:00Z\",\n \"metadata\": {},\n \"schedule\": {\n \"kind\": \"instant\",\n \"localDatetime\": \"2026-12-19T18:00:00\",\n \"timezone\": \"Africa/Kampala\",\n \"offsetMinutes\": 180,\n \"utcAt\": \"2026-12-19T15:00:00Z\",\n \"source\": \"calendar\",\n \"recommendationId\": \"recommendation-42\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"client_id": 1,
"event_id": 1,
"type": "Example",
"trigger": "Example",
"channel": "Example",
"status": "draft",
"segment": "Example",
"subject": "Example",
"body": "Example",
"send_at": "2026-10-20T12:00:00Z",
"schedule_mode": "Example",
"schedule_config": {},
"schedule_claim_id": 1,
"claimed_at": "2026-10-20T12:00:00Z",
"sent_at": "2026-10-20T12:00:00Z",
"metadata": {},
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z",
"deleted_at": "2026-10-20T12:00:00Z"
}
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"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."
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Record ID in the authenticated organization.
42
Journey ID in the authenticated organization.
42
Body
Type.
80"Example"
Trigger.
80"Example"
Channel.
email, sms, task "email"
Status.
draft, scheduled, sent, paused "draft"
Segment.
120"Example"
Subject.
255"Example"
Body.
"Example"
Send at. Date without offset is interpreted in the event timezone.
"2026-12-20T18:00:00Z"
Sent at. Date without offset is interpreted in the event timezone.
"2026-12-20T18:00:00Z"
Metadata.
Closed instant/relative intent; a supplied legacy send_at must match the resolved instant.
Show child attributes
Show child attributes
Response
Update an event communication completed.
Show child attributes
Show child attributes
curl --request PUT \
--url https://api.gratona.com/v1/admin/events/{eventId}/communications/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "Example",
"trigger": "Example",
"channel": "email",
"status": "draft",
"segment": "Example",
"subject": "Example",
"body": "Example",
"send_at": "2026-12-20T18:00:00Z",
"sent_at": "2026-12-20T18:00:00Z",
"metadata": {},
"schedule": {
"kind": "instant",
"localDatetime": "2026-12-19T18:00:00",
"timezone": "Africa/Kampala",
"offsetMinutes": 180,
"utcAt": "2026-12-19T15:00:00Z",
"source": "calendar",
"recommendationId": "recommendation-42"
}
}
'import requests
url = "https://api.gratona.com/v1/admin/events/{eventId}/communications/{id}"
payload = {
"type": "Example",
"trigger": "Example",
"channel": "email",
"status": "draft",
"segment": "Example",
"subject": "Example",
"body": "Example",
"send_at": "2026-12-20T18:00:00Z",
"sent_at": "2026-12-20T18:00:00Z",
"metadata": {},
"schedule": {
"kind": "instant",
"localDatetime": "2026-12-19T18:00:00",
"timezone": "Africa/Kampala",
"offsetMinutes": 180,
"utcAt": "2026-12-19T15:00:00Z",
"source": "calendar",
"recommendationId": "recommendation-42"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'Example',
trigger: 'Example',
channel: 'email',
status: 'draft',
segment: 'Example',
subject: 'Example',
body: JSON.stringify('Example'),
send_at: '2026-12-20T18:00:00Z',
sent_at: '2026-12-20T18:00:00Z',
metadata: {},
schedule: {
kind: 'instant',
localDatetime: '2026-12-19T18:00:00',
timezone: 'Africa/Kampala',
offsetMinutes: 180,
utcAt: '2026-12-19T15:00:00Z',
source: 'calendar',
recommendationId: 'recommendation-42'
}
})
};
fetch('https://api.gratona.com/v1/admin/events/{eventId}/communications/{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/admin/events/{eventId}/communications/{id}",
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([
'type' => 'Example',
'trigger' => 'Example',
'channel' => 'email',
'status' => 'draft',
'segment' => 'Example',
'subject' => 'Example',
'body' => 'Example',
'send_at' => '2026-12-20T18:00:00Z',
'sent_at' => '2026-12-20T18:00:00Z',
'metadata' => [
],
'schedule' => [
'kind' => 'instant',
'localDatetime' => '2026-12-19T18:00:00',
'timezone' => 'Africa/Kampala',
'offsetMinutes' => 180,
'utcAt' => '2026-12-19T15:00:00Z',
'source' => 'calendar',
'recommendationId' => 'recommendation-42'
]
]),
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/admin/events/{eventId}/communications/{id}"
payload := strings.NewReader("{\n \"type\": \"Example\",\n \"trigger\": \"Example\",\n \"channel\": \"email\",\n \"status\": \"draft\",\n \"segment\": \"Example\",\n \"subject\": \"Example\",\n \"body\": \"Example\",\n \"send_at\": \"2026-12-20T18:00:00Z\",\n \"sent_at\": \"2026-12-20T18:00:00Z\",\n \"metadata\": {},\n \"schedule\": {\n \"kind\": \"instant\",\n \"localDatetime\": \"2026-12-19T18:00:00\",\n \"timezone\": \"Africa/Kampala\",\n \"offsetMinutes\": 180,\n \"utcAt\": \"2026-12-19T15:00:00Z\",\n \"source\": \"calendar\",\n \"recommendationId\": \"recommendation-42\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.gratona.com/v1/admin/events/{eventId}/communications/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"Example\",\n \"trigger\": \"Example\",\n \"channel\": \"email\",\n \"status\": \"draft\",\n \"segment\": \"Example\",\n \"subject\": \"Example\",\n \"body\": \"Example\",\n \"send_at\": \"2026-12-20T18:00:00Z\",\n \"sent_at\": \"2026-12-20T18:00:00Z\",\n \"metadata\": {},\n \"schedule\": {\n \"kind\": \"instant\",\n \"localDatetime\": \"2026-12-19T18:00:00\",\n \"timezone\": \"Africa/Kampala\",\n \"offsetMinutes\": 180,\n \"utcAt\": \"2026-12-19T15:00:00Z\",\n \"source\": \"calendar\",\n \"recommendationId\": \"recommendation-42\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/events/{eventId}/communications/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"Example\",\n \"trigger\": \"Example\",\n \"channel\": \"email\",\n \"status\": \"draft\",\n \"segment\": \"Example\",\n \"subject\": \"Example\",\n \"body\": \"Example\",\n \"send_at\": \"2026-12-20T18:00:00Z\",\n \"sent_at\": \"2026-12-20T18:00:00Z\",\n \"metadata\": {},\n \"schedule\": {\n \"kind\": \"instant\",\n \"localDatetime\": \"2026-12-19T18:00:00\",\n \"timezone\": \"Africa/Kampala\",\n \"offsetMinutes\": 180,\n \"utcAt\": \"2026-12-19T15:00:00Z\",\n \"source\": \"calendar\",\n \"recommendationId\": \"recommendation-42\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"client_id": 1,
"event_id": 1,
"type": "Example",
"trigger": "Example",
"channel": "Example",
"status": "draft",
"segment": "Example",
"subject": "Example",
"body": "Example",
"send_at": "2026-10-20T12:00:00Z",
"schedule_mode": "Example",
"schedule_config": {},
"schedule_claim_id": 1,
"claimed_at": "2026-10-20T12:00:00Z",
"sent_at": "2026-10-20T12:00:00Z",
"metadata": {},
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z",
"deleted_at": "2026-10-20T12:00:00Z"
}
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"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."
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}