Test every message your template can become.
A short placeholder can hide a long name, an extended GSM character or a Unicode value. Test rendered combinations—not the template skeleton.
Why template length is misleading
A template such as Hello {{name}}, your code is {{code}} has no final encoding or billable segment count. Those properties exist only after every variable is rendered. Production data can change the alphabet, cross a multipart boundary or create a much larger campaign total than the preview suggested.
Choose useful samples
- Include the shortest, typical and longest values observed for each variable.
- Include multilingual names and deliberately preserved characters.
- Include punctuation copied from rich-text editors.
- Use realistic coupon codes, links and legal suffixes.
- Represent genuine risk without inventing impossible combinations.
Automate combinations
curl -X POST \
https://textpreflight.kadircoteli.workers.dev/api/v1/template/simulate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer TPF-YOUR-LICENSE-KEY" \
-d '{"template":"Hi {{name}}, code {{code}}.","variables":{"name":["Ada","Zoë","Alexandria"],"code":[1234,9999]},"recipients":10000,"unitPrice":0.0075,"currency":"USD"}'
The response identifies minimum, average and maximum segment outcomes, encoding distribution and every rendered case. That makes the result useful in release review, quality checks and campaign approval.
A higher-cost character can be intentional. Preflight makes the tradeoff visible; it does not erase names, languages or brand voice automatically.
Put the worst case in your release gate.
Use the API to test real production samples automatically whenever a template changes.