TextPreflightGuide
Campaign forecasting

Estimate billable segments, not visible characters.

A campaign forecast should account for each message variant, its recipients, its encoded segment count and your actual unit price.

The calculation

For every variant, multiply encoded segments by its recipient count. Sum those billable segments, then multiply by the per-segment price from your current route. TextPreflight performs the encoding and segmentation step for each variant and returns the distribution behind the total.

billable segments = Σ(message segments × recipients)
estimated cost = billable segments × unit price

Estimate multiple variants

curl -X POST \
  https://textpreflight.kadircoteli.workers.dev/api/v1/campaign/estimate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer TPF-YOUR-LICENSE-KEY" \
  -d '{"messages":[{"text":"Delivery today.","recipients":8500},{"text":"Delivery tomorrow.","recipients":1500}],"unitPrice":0.0075,"currency":"USD"}'

What to review before approval

An estimate is not an invoice.

Taxes, destination, route, sender type and provider pricing can change the final charge. Supply your real unit price and validate critical decisions against your current commercial terms.

Make campaign approval auditable.

Return the same deterministic forecast to your application, review screen or release check.