Skip to main content

SMS Templates

SMS templates allow you to send plain text messages via SMPP.

Creating an SMS Template

curl -X POST https://api.transformify.mk/api/v1/templates/sms \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Order Confirmation SMS",
"description": "Sent when order is placed",
"templateContent": "Your order #{{orderId}} is confirmed. Total: ${{total}}. Track at: {{trackingUrl}}",
"smsSenderId": 42
}'

Parameters

FieldTypeRequiredDescription
namestringYesTemplate name
descriptionstringNoTemplate description (max 500 chars)
templateContentstringYesMessage text (max 1600 chars)
smsSenderIdintegerNoAn approved SMS Sender ID belonging to your company
Choosing an SMS Sender

Use GET /api/v1/sms-senders to list your approved SMS senders. The smsSenderId you set on the template will be used as the sender for all campaigns created from it.

Response

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Order Confirmation SMS",
"description": "Sent when order is placed",
"messageType": 1,
"channelType": "Smpp",
"templateContent": "Your order #{{orderId}} is confirmed. Total: ${{total}}. Track at: {{trackingUrl}}",
"smsSenderId": 42,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}

Limitations

ConstraintValue
Maximum length1600 characters
Supported contentText only (no media)
Character encodingGSM-7 or Unicode

Template Examples

OTP/Verification

{
"name": "OTP Code",
"templateContent": "Your verification code is {{code}}. Valid for {{expiry}} minutes. Do not share."
}

Order Confirmation

{
"name": "Order Placed",
"templateContent": "Thanks for your order #{{orderId}}! Total: ${{total}}. Delivery: {{deliveryDate}}."
}

Appointment Reminder

{
"name": "Appointment Reminder",
"templateContent": "Reminder: Appointment on {{date}} at {{time}}. Reply YES to confirm or call {{phone}} to reschedule."
}

Delivery Update

{
"name": "Out for Delivery",
"templateContent": "Your package is out for delivery! Expected arrival: {{timeWindow}}. Track: {{url}}"
}

Alert/Notification

{
"name": "Account Alert",
"templateContent": "Alert: {{action}} on your account at {{time}}. If not you, call {{phone}} immediately."
}

Using SMS Templates

Send Single Message

curl -X POST https://api.transformify.mk/api/v1/sms/promotional \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"templateId": "sms-template-id",
"recipients": [
{ "phoneNumber": "38970123456" }
],
"placeholders": {
"orderId": "12345",
"total": "99.99",
"deliveryDate": "Tomorrow"
}
}'

Send Bulk SMS

curl -X POST https://api.transformify.mk/api/v1/sms/promotional \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"templateId": "sms-template-id",
"recipients": [
{ "phoneNumber": "38970111111" },
{ "phoneNumber": "38970222222" },
{ "phoneNumber": "38970333333" }
],
"placeholders": {
"message": "Flash sale today! 20% off everything."
}
}'

SMS vs Viber

FactorSMSViber
ReachUniversalViber users only
ContentText onlyRich media
CostHigherLower
DeliveryWorks offlineRequires internet
InteractivityLimitedButtons, surveys

When to use SMS:

  • OTP/verification codes (reliability critical)
  • Users without Viber
  • Simple notifications
  • Fallback for failed Viber messages

When to use Viber:

  • Marketing with images
  • Interactive content
  • Cost optimization
  • Rich notifications

Best Practices

  1. Keep it short - Aim for under 160 characters when possible
  2. Avoid Unicode - Use standard characters to reduce costs
  3. Include opt-out - Add "Reply STOP to unsubscribe" for marketing
  4. Identify yourself - Start with your brand name
  5. Be clear - SMS has no formatting, so be concise
  6. Test segment count - Preview messages to check length