Templates¶
Retrieve saved SMS and email templates to use in send requests.
Query parameters¶
| Parameter | Type | Description |
|---|---|---|
type |
string | Filter by email or sms. Omit to return both. |
Examples¶
Response — all types¶
{
"success": true,
"data": {
"email": [
{
"id": 3,
"name": "Order Shipped",
"subject": "Your order is on its way!",
"source": "custom"
},
{
"id": 1,
"name": "Welcome Email",
"subject": "Welcome to {{brand}}",
"source": "starter"
}
],
"sms": [
{
"id": 7,
"name": "Appointment Reminder",
"message": "Hi {{name}}, your appointment is tomorrow at {{time}}.",
"created_at": "2025-04-10 11:00:00"
}
]
}
}
Response — filtered by type¶
When type is specified, data is a flat array:
{
"success": true,
"type": "sms",
"data": [
{
"id": 7,
"name": "Appointment Reminder",
"message": "Hi {{name}}, your appointment is tomorrow at {{time}}.",
"created_at": "2025-04-10 11:00:00"
}
]
}
Template fields¶
Email template¶
| Field | Type | Description |
|---|---|---|
id |
integer | Template ID — use as template_id in Send Email |
name |
string | Template display name |
subject |
string | Default email subject (may contain {{variables}}) |
source |
string | custom = created by you, starter = platform default |
SMS template¶
| Field | Type | Description |
|---|---|---|
id |
integer | Template ID — use as template_id in Send SMS |
name |
string | Template name |
message |
string | SMS body (may contain {{variables}}) |
created_at |
string | Creation timestamp |
Using templates in sends¶
Pass the id as template_id:
See Send SMS → template example and Send Email → template example.