SMS Templates and Sender IDs
List the SMS templates you can send with, and your sender IDs. Use it to find a template's dlt_template_id and how many variables it needs before you call Send SMS or Send bulk SMS.
You add and verify templates in the app, not through the API. See SMS templates.
Headers
Both endpoints use the same headers:
List templates
https://api.splashifypro.com/api/v1/public/sms/templates
Only approved templates are listed, because only those can send. A template you added but did not verify yet does not show here.
Examples
cURL
curl https://api.splashifypro.com/api/v1/public/sms/templates \
-H "Authorization: Basic YOUR_API_KEY"Node.js / TypeScript
const res = await fetch("https://api.splashifypro.com/api/v1/public/sms/templates", {
headers: { "Authorization": `Basic ${process.env.SPLASHIFY_API_KEY!}` },
});
const { templates } = await res.json();
const otp = templates.find((t: { dlt_template_id: string }) => t.dlt_template_id === "1107160000000000001");
console.log(otp?.variables); // how many values to sendPython
import os, requests
r = requests.get(
"https://api.splashifypro.com/api/v1/public/sms/templates",
headers={"Authorization": f"Basic {os.environ['SPLASHIFY_API_KEY']}"},
timeout=30,
)
templates = r.json()["templates"]Response (200 OK)
{
"success": true,
"templates": [
{
"dlt_template_id": "1107160000000000001",
"name": "Login code",
"type": "service_implicit",
"sender_id": "ACMEOT",
"body": "Dear {#var#}, your Acme Boutique login code is {#var#}. Do not share it.",
"variables": 2
},
{
"dlt_template_id": "1107160000000000003",
"name": "Diwali offer",
"type": "promotional",
"sender_id": "ACMEBT",
"body": "Diwali sale at Acme Boutique: {#var#} off on all sarees till {#var#}. Visit acme-boutique.in",
"variables": 2
}
]
}Types
The type is part of the template. It decides the price, and you cannot change it per message. See Pricing and billing.
List sender IDs
https://api.splashifypro.com/api/v1/public/sms/senders
curl https://api.splashifypro.com/api/v1/public/sms/senders \
-H "Authorization: Basic YOUR_API_KEY"Response (200 OK)
{
"success": true,
"senders": [
{ "sender_id": "ACMEBT", "type": "promotional", "status": "approved" },
{ "sender_id": "ACMEOT", "type": "service_implicit", "status": "approved" }
]
}Every sender ID on your account is listed, whatever its status.
You add and remove sender IDs in the app. See Set up SMS.
Errors
{
"success": false,
"code": "sms_not_set_up",
"message": "Set up SMS first."
}The checks every Public API request goes through answer the same way as on Send SMS: 401 for a missing or invalid API key, 403 when your plan does not include the Public API, your IP is not on the allowlist or your account is suspended, and 429 over your plan's rate limit.
Good to know
- Cache the list. Templates change only when you add or remove one in the app. Reading the list once an hour, or when a send returns
template_not_foundortemplate_not_approved, is plenty. - Match on
dlt_template_id. It is the id the send endpoints take. Thenameis only a label for you.