Communications
Create a custom automated SMS template
Requires configured Sendblue and a tenant-owned set. Supports notify_donor_photo, notify_donor_future_sponsorship or a Journeys-library trigger. Rejects an existing trigger in the set. Creates an empty disabled default variant. name is used in the receipt message rather than persisted as a template attribute. Requires permission: one of manage_sms.
POST
/
admin
/
auto_sms
/
template
Create a custom automated SMS template
curl --request POST \
--url https://api.gratona.com/v1/admin/auto_sms/template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Education stories",
"smsset_id": 1,
"trigger": "Trigger"
}
'import requests
url = "https://api.gratona.com/v1/admin/auto_sms/template"
payload = {
"name": "Education stories",
"smsset_id": 1,
"trigger": "Trigger"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Education stories', smsset_id: 1, trigger: 'Trigger'})
};
fetch('https://api.gratona.com/v1/admin/auto_sms/template', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Education stories',
'smsset_id' => 1,
'trigger' => 'Trigger'
]),
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/auto_sms/template"
payload := strings.NewReader("{\n \"name\": \"Education stories\",\n \"smsset_id\": 1,\n \"trigger\": \"Trigger\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/admin/auto_sms/template")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Education stories\",\n \"smsset_id\": 1,\n \"trigger\": \"Trigger\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/auto_sms/template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Education stories\",\n \"smsset_id\": 1,\n \"trigger\": \"Trigger\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"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"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Body
application/json
Validated request fields for this operation.
⌘I
Create a custom automated SMS template
curl --request POST \
--url https://api.gratona.com/v1/admin/auto_sms/template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Education stories",
"smsset_id": 1,
"trigger": "Trigger"
}
'import requests
url = "https://api.gratona.com/v1/admin/auto_sms/template"
payload = {
"name": "Education stories",
"smsset_id": 1,
"trigger": "Trigger"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Education stories', smsset_id: 1, trigger: 'Trigger'})
};
fetch('https://api.gratona.com/v1/admin/auto_sms/template', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Education stories',
'smsset_id' => 1,
'trigger' => 'Trigger'
]),
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/auto_sms/template"
payload := strings.NewReader("{\n \"name\": \"Education stories\",\n \"smsset_id\": 1,\n \"trigger\": \"Trigger\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/admin/auto_sms/template")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Education stories\",\n \"smsset_id\": 1,\n \"trigger\": \"Trigger\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/auto_sms/template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Education stories\",\n \"smsset_id\": 1,\n \"trigger\": \"Trigger\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"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"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}