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.io/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.io/v1/developer/spintax/spin \
-H "X-API-Key: $MSGERA_KEY" \
-H "Content-Type: application/json" \
-d '{ "template": "{Hi|Hello} there" }'Automatic variations for campaigns
Campaigns sent from a linked device need one unique wording per 8 recipients. If your text, including its own spintax, doesn't provide enough, Msgera generates variations for you and holds the campaign in AWAITING_REVIEW until you approve them. Your original wording is always kept as one of the options. See Campaign Variations to review, edit, and approve them via API.
To skip the review step, generate variations before creating the campaign with Draft Variations, review them in your own UI, and pass them as variationSegmentswhen you create the campaign - it then starts immediately. When a campaign's text matches one whose variations you approved before, those variations are reused automatically, without generating new ones or using your monthly quota.
Plan-gated
spintax plan feature on your account. Inline spintax inside send endpoints follows the same gate.