Communications
Read a mailing template editor
Returns the tenant-owned template with full HTML/serialized design/settings, bindings, form-aware merge groups and latest-record preview context. System templates can be read but cannot be edited, archived or duplicated. Requires permission: one of mailings_view, mailings_generate, mailings_manage, manage_email, reports_view, reports_manage.
GET
/
admin
/
mailing_templates
/
{id}
Read a mailing template editor
curl --request GET \
--url https://api.gratona.com/v1/admin/mailing_templates/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/mailing_templates/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/mailing_templates/{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/mailing_templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/mailing_templates/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gratona.com/v1/admin/mailing_templates/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/mailing_templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 42,
"name": "Education impact letter",
"scope_type": "donor",
"template_kind": "custom",
"preset_key": "Example",
"render_strategy": "unlayer_pdf",
"description": "Example",
"is_active": true,
"program_ids": [
42
],
"program_bindings": [
{
"id": 42,
"program_id": 42,
"name": "Example"
}
],
"applicability_label": "Client-wide",
"documents": [
{
"id": 42,
"document_kind": "letter",
"page_preset": "us_letter_portrait",
"editor_mode": "unlayer",
"html": "<p>Dear [donor_name], thank you for your support.</p>",
"design": "{`body`:{}}",
"settings_json": {}
}
],
"has_labels": true,
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z",
"available_programs": [
{
"id": 42,
"name": "Example"
}
],
"merge_schema": [
{
"key": "donor",
"name": "Donor",
"merge_tags": {},
"form_category": "donor",
"form_id": 42,
"form_name": "Example",
"program_ids": [
42
],
"program_names": [
"Example"
],
"use_standardized_fields": true
}
],
"merge_tags": {},
"preview_context": {
"preview_type": "donor",
"donor_id": 42,
"donor_entity_id": 42,
"trip_participant_id": 42,
"entity_id": 42,
"donor_hysform_id": 42,
"entity_hysform_id": 42,
"merge_data": {
"organization_name": "Example",
"organization_email": "jsmith@example.com",
"organization_website": "Example",
"organization_phone": "Example",
"base_currency": "Example",
"organization_timezone": "Africa/Kampala",
"donor_id": 42,
"donor_name": "Example",
"donor_email": "<string>",
"email": "<string>",
"username": "Example",
"recipient_name": "Example",
"household_id": 42,
"donor_entity_id": 42,
"entity_id": 42,
"program_id": 42,
"program_name": "Example",
"commitment_id": 42,
"sponsorship_amount": 123,
"sponsorship_frequency": "Example",
"sponsorship_start_date": "Example",
"last_payment_date": "Example",
"next_payment_date": "Example",
"generated_date": "10/20/2026",
"generated_datetime": "Example",
"year": 2026
}
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}⌘I
Read a mailing template editor
curl --request GET \
--url https://api.gratona.com/v1/admin/mailing_templates/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/mailing_templates/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/mailing_templates/{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/mailing_templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/mailing_templates/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gratona.com/v1/admin/mailing_templates/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/mailing_templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 42,
"name": "Education impact letter",
"scope_type": "donor",
"template_kind": "custom",
"preset_key": "Example",
"render_strategy": "unlayer_pdf",
"description": "Example",
"is_active": true,
"program_ids": [
42
],
"program_bindings": [
{
"id": 42,
"program_id": 42,
"name": "Example"
}
],
"applicability_label": "Client-wide",
"documents": [
{
"id": 42,
"document_kind": "letter",
"page_preset": "us_letter_portrait",
"editor_mode": "unlayer",
"html": "<p>Dear [donor_name], thank you for your support.</p>",
"design": "{`body`:{}}",
"settings_json": {}
}
],
"has_labels": true,
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z",
"available_programs": [
{
"id": 42,
"name": "Example"
}
],
"merge_schema": [
{
"key": "donor",
"name": "Donor",
"merge_tags": {},
"form_category": "donor",
"form_id": 42,
"form_name": "Example",
"program_ids": [
42
],
"program_names": [
"Example"
],
"use_standardized_fields": true
}
],
"merge_tags": {},
"preview_context": {
"preview_type": "donor",
"donor_id": 42,
"donor_entity_id": 42,
"trip_participant_id": 42,
"entity_id": 42,
"donor_hysform_id": 42,
"entity_hysform_id": 42,
"merge_data": {
"organization_name": "Example",
"organization_email": "jsmith@example.com",
"organization_website": "Example",
"organization_phone": "Example",
"base_currency": "Example",
"organization_timezone": "Africa/Kampala",
"donor_id": 42,
"donor_name": "Example",
"donor_email": "<string>",
"email": "<string>",
"username": "Example",
"recipient_name": "Example",
"household_id": 42,
"donor_entity_id": 42,
"entity_id": 42,
"program_id": 42,
"program_name": "Example",
"commitment_id": 42,
"sponsorship_amount": 123,
"sponsorship_frequency": "Example",
"sponsorship_start_date": "Example",
"last_payment_date": "Example",
"next_payment_date": "Example",
"generated_date": "10/20/2026",
"generated_datetime": "Example",
"year": 2026
}
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}