Spintax
Randomise message wording across sends with Msgera's spintax syntax.
Spintax lets you randomise the wording of an outbound message so that no two sends are byte-identical. Msgera evaluates spintax server-side when you send text messages and runs campaign jobs, which helps reduce the risk of duplicate-content flags.
Syntax
Wrap alternatives in { }, separated by |. You can nest groups freely.
{Hi|Hello|Hey} {{name}}, {your order|the package} is {on its way|out for delivery} 🚚Plain {{name}} placeholders are left untouched — those are filled in by campaign recipient data, not the spinner.
Preview variations
Use POST /v1/developer/spintax/preview to generate up to 50 sample variations of a template:
curl -X POST https://api.msgera.com/v1/developer/spintax/preview \
-H "X-API-Key: $MSGERA_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "{Hi|Hello} there, your order is {on its way|out for delivery}",
"count": 5
}'| Field | Type | Description |
|---|---|---|
templaterequired | string | Spintax template, min 1 character. |
count | integer | Number of samples (1–50). Defaults to 5. |
Spin a single variation
Use POST /v1/developer/spintax/spin to expand a template once — useful when you want to deterministically log the exact text you will send.
curl -X POST https://api.msgera.com/v1/developer/spintax/spin \
-H "X-API-Key: $MSGERA_KEY" \
-H "Content-Type: application/json" \
-d '{ "template": "{Hi|Hello} there" }'Plan-gated
The spintax endpoints require the
spintax plan feature on your account. Inline spintax inside send endpoints follows the same gate.