/templates
Templates are reusable message formats with variable substitution. Create templates in the dashboard or via the API, then reference them when sending notifications.
Endpoints
Section titled “Endpoints”List templates
Section titled “List templates”GET https://api.smooven.io/v1/templates
Get a template
Section titled “Get a template”GET https://api.smooven.io/v1/templates/{template_id}
Create a template
Section titled “Create a template”POST https://api.smooven.io/v1/templates
Update a template
Section titled “Update a template”PUT https://api.smooven.io/v1/templates/{template_id}
Delete a template
Section titled “Delete a template”DELETE https://api.smooven.io/v1/templates/{template_id}
Create a template
Section titled “Create a template”POST /v1/templates{ "name": "order_confirmation", "channel": "email", "subject": "Order {{order_id}} confirmed", "html": "<h1>Thanks, {{customer_name}}!</h1><p>Your order {{order_id}} for {{total}} has been confirmed.</p>", "text": "Thanks, {{customer_name}}! Your order {{order_id}} for {{total}} has been confirmed."}Variables
Section titled “Variables”Use double curly braces for variable substitution: {{variable_name}}. Variables are replaced at send time with values from the variables object in the notification request.
Send using a template
Section titled “Send using a template”POST /v1/agent/notify{ "channel": "email", "to": "customer@example.com", "email": { "from": "orders@yourdomain.com", "template_id": "tmpl_order_confirmation", "variables": { "customer_name": "Sarah", "order_id": "ORD-5678", "total": "$99.00" } }}Multi-channel templates
Section titled “Multi-channel templates”A single template can define content for multiple channels. Smooven uses the version matching the selected delivery channel:
POST /v1/templates{ "name": "appointment_reminder", "variants": { "sms": { "message": "Reminder: {{appointment_type}} at {{time}} tomorrow. Reply CANCEL to reschedule." }, "email": { "subject": "Appointment reminder: {{appointment_type}}", "html": "<h1>Your {{appointment_type}} is tomorrow</h1><p>Time: {{time}}</p><p>Location: {{location}}</p>" }, "push": { "title": "Appointment tomorrow", "body": "{{appointment_type}} at {{time}}" } }}