Communications
Duplicate a custom mailing template
Copies the template, documents and program bindings with a Copy suffix, current actor ownership and freshly validated Impact Story evidence. System templates cannot be duplicated. Requires permission: one of mailings_manage, manage_email.
POST
/
admin
/
mailing_templates
/
{id}
/
duplicate
Duplicate a custom mailing template
curl --request POST \
--url https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate', 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}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/duplicate"
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}⌘I
Duplicate a custom mailing template
curl --request POST \
--url https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate', 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}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/duplicate"
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/mailing_templates/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}