Read an automated SMS template editor
Reads the selected trigger/variant, default donation_type=default, and creates an enabled empty template when absent. Returns known/unknown shortcodes, eligible form fields, validation results and three latest commitment preview options. Receipt triggers include all variant records. The current authenticated sendblue projection contains credential fields. Requires permission: one of manage_sms.
curl --request GET \
--url https://api.gratona.com/v1/admin/auto_sms/template/{smsset_id}/{trigger} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/auto_sms/template/{smsset_id}/{trigger}"
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/auto_sms/template/{smsset_id}/{trigger}', 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/auto_sms/template/{smsset_id}/{trigger}",
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/auto_sms/template/{smsset_id}/{trigger}"
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/auto_sms/template/{smsset_id}/{trigger}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/auto_sms/template/{smsset_id}/{trigger}")
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{
"smstemplate": {
"id": 42,
"client_id": 42,
"smsset_id": 42,
"trigger": "pay_receipt",
"message": "Thank you for your [method] gift of [total_amount] to [designations] on [date].",
"to_numbers": "+15551234567,+15557654321",
"variant_type": "default",
"disabled": true,
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z",
"deleted_at": "2026-10-20T12:00:00Z"
},
"smsset": {
"id": 42,
"client_id": 42,
"name": "Education SMS templates",
"from_number": "+15551234567",
"sms_line_id": 42,
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z",
"deleted_at": "2026-10-20T12:00:00Z"
},
"to": true,
"title": "Example",
"shortcodes": [
"<string>"
],
"participant_shortcodes": [
"<string>"
],
"hysform": [
{
"id": 42,
"client_id": 42,
"hysform_id": 42,
"field_key": "name",
"field_label": "Name",
"field_type": "text",
"field_data": "<string>",
"permissions": "public",
"is_title": 123,
"program_permissions": {},
"conditional_display_rule": {},
"donor_type": "all",
"revision": 1
}
],
"unrecognised_shortcodes": [
"<string>"
],
"donor_hysform": [
{
"id": 42,
"client_id": 42,
"hysform_id": 42,
"field_key": "name",
"field_label": "Name",
"field_type": "text",
"field_data": "<string>",
"permissions": "public",
"is_title": 123,
"program_permissions": {},
"conditional_display_rule": {},
"donor_type": "all",
"revision": 1
}
],
"trigger": "pay_receipt",
"template_errors": {},
"data": [
{
"value": 42,
"label": "Jane Donor sponsors Education"
}
],
"sendblue": {
"mode": "client_managed",
"enabled": true,
"default_sms_line_id": 42,
"default_from_number": "+15551234567",
"api_key_id": "REDACTED",
"api_secret_key": "REDACTED",
"callback_secret": "REDACTED",
"webhook_secret": "REDACTED",
"managed_subaccount_id": "Example",
"managed_provisioning_status": "inactive",
"requested_area_code": "Example",
"assigned_line_id": 42,
"assigned_number": "+15551234567",
"line_metadata": {},
"lines": [
{
"phone_number": "+15551234567",
"label": "Example",
"provider_line_id": "Example",
"line_role": "general",
"assigned_user_id": 42,
"visibility": "shared",
"status": "active",
"metadata": {}
}
]
},
"supports_variants": true,
"variants": {},
"variant_shortcodes": {}
}{
"message": "Unauthorized",
"status": "error"
}{
"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
Smsset id in the current organization.
Supported automated SMS trigger from the template catalog.
Query Parameters
Stored variant key; defaults default.
Response
Operation result.
Receipt variants/support fields appear only when the trigger supports variants. data contains at most three latest commitment preview options.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
true
Serialized value.
"Example"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"pay_receipt"
SMS-set-id to trigger validation map; empty state serializes as an array.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Authenticated organization Sendblue configuration. The current API includes credential values; treat this response as sensitive. Examples contain no real credentials.
Show child attributes
Show child attributes
true
Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request GET \
--url https://api.gratona.com/v1/admin/auto_sms/template/{smsset_id}/{trigger} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/auto_sms/template/{smsset_id}/{trigger}"
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/auto_sms/template/{smsset_id}/{trigger}', 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/auto_sms/template/{smsset_id}/{trigger}",
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/auto_sms/template/{smsset_id}/{trigger}"
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/auto_sms/template/{smsset_id}/{trigger}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/auto_sms/template/{smsset_id}/{trigger}")
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{
"smstemplate": {
"id": 42,
"client_id": 42,
"smsset_id": 42,
"trigger": "pay_receipt",
"message": "Thank you for your [method] gift of [total_amount] to [designations] on [date].",
"to_numbers": "+15551234567,+15557654321",
"variant_type": "default",
"disabled": true,
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z",
"deleted_at": "2026-10-20T12:00:00Z"
},
"smsset": {
"id": 42,
"client_id": 42,
"name": "Education SMS templates",
"from_number": "+15551234567",
"sms_line_id": 42,
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z",
"deleted_at": "2026-10-20T12:00:00Z"
},
"to": true,
"title": "Example",
"shortcodes": [
"<string>"
],
"participant_shortcodes": [
"<string>"
],
"hysform": [
{
"id": 42,
"client_id": 42,
"hysform_id": 42,
"field_key": "name",
"field_label": "Name",
"field_type": "text",
"field_data": "<string>",
"permissions": "public",
"is_title": 123,
"program_permissions": {},
"conditional_display_rule": {},
"donor_type": "all",
"revision": 1
}
],
"unrecognised_shortcodes": [
"<string>"
],
"donor_hysform": [
{
"id": 42,
"client_id": 42,
"hysform_id": 42,
"field_key": "name",
"field_label": "Name",
"field_type": "text",
"field_data": "<string>",
"permissions": "public",
"is_title": 123,
"program_permissions": {},
"conditional_display_rule": {},
"donor_type": "all",
"revision": 1
}
],
"trigger": "pay_receipt",
"template_errors": {},
"data": [
{
"value": 42,
"label": "Jane Donor sponsors Education"
}
],
"sendblue": {
"mode": "client_managed",
"enabled": true,
"default_sms_line_id": 42,
"default_from_number": "+15551234567",
"api_key_id": "REDACTED",
"api_secret_key": "REDACTED",
"callback_secret": "REDACTED",
"webhook_secret": "REDACTED",
"managed_subaccount_id": "Example",
"managed_provisioning_status": "inactive",
"requested_area_code": "Example",
"assigned_line_id": 42,
"assigned_number": "+15551234567",
"line_metadata": {},
"lines": [
{
"phone_number": "+15551234567",
"label": "Example",
"provider_line_id": "Example",
"line_role": "general",
"assigned_user_id": 42,
"visibility": "shared",
"status": "active",
"metadata": {}
}
]
},
"supports_variants": true,
"variants": {},
"variant_shortcodes": {}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}