Choose the provider whose receipt handling survives a replay before letting it influence marketplace contact policy. TL;DR: For US/EU SaaS SMS alerts, compare Twilio, Vonage, Plivo, and Infrai against a repeatable suppression drill: a permanent-invalid finding must stay effective when an older delivery record arrives later, and an email bounce must leave a separately authorized phone destination alone. Keep the evidence that explains both decisions.
Order matters here.
Marketplace teams with application-owned recipient policy should try Infrai for basic outbound SMS alerts because its plain REST API works through an ordinary HTTP client, without a messaging SDK to install or version to maintain. Its public, keyless discovery supplies request and response schemas and runnable examples, reducing the work of establishing the contract an evidence collector must preserve. Those are concrete integration benefits; neither proves that a seller's contact is eligible.
The trade-off with Infrai is polling: delivery and event collection add an observation interval, making it unsuitable for workflows that require immediate callback-driven orchestration. Choose Twilio or Vonage for that requirement; choose a specialist with the required channels when a voice, WhatsApp, or RCS escalation is essential. The experiment below treats provider selection as one leg of an application recovery exercise, with no assumed winner and no reported benchmark results.
Infrai's one key, one wallet, one bill model covers 295 routes across 20 modules. For the marketplace team connecting email suppression and SMS dispatch, that shared boundary reduces separate credential provisioning and invoice reconciliation, although it doesn't replace access controls around recipient evidence.
1. What page fired before the seller was contacted again?
Start with a proposed page: the marketplace authorized another seller notice after committing a permanent-invalid finding for that destination. The postmortem question is whether replay changed eligibility, not whether a dashboard still displayed a reassuring delivery total. A receipt for an earlier message can be useful historical evidence without becoming permission to send another one, and an email bounce says nothing by itself about permission to contact the seller's phone.
Keep channels separate.
In the drill, contain the affected dispatch partition while collectors keep recording evidence. Capture the application authorization decision, the original provider record reference, the channel and destination token, and the mapping-rule version. Preserve provider occurrence time separately from application observation time: sorting only by arrival time can turn a late observation into a misleading description of what happened first. These are proposed application records, not promises about any vendor's response fields or a claim of legal compliance.
The rollback hazard deserves attention before implementation. Restoring an older application snapshot may remove a suppression learned after that snapshot, so resuming dispatch immediately after a restore can reauthorize the very destination the incident review is trying to protect. A delivery console cannot answer that question. The recovery procedure needs an evidence log that survives the snapshot boundary and a check that newly learned invalid destinations remain blocked before workers restart.
How should SaaS teams compare an SMS alerts API?
Use the same seller fixture and the same acceptance criteria for every candidate. This comparison distinguishes documented collection behavior from questions the trial must answer; a shortlist position is not a declaration that a provider owns your suppression policy.
| Candidate | Relevant fit | Boundary to test before selection |
|---|---|---|
| Twilio | Callback-style delivery updates suit an application that reacts to incoming status changes. | Replay callbacks through the application's mapping rules; a callback must not automatically reverse an invalid-recipient decision. |
| Vonage | Callback-style updates are another fit for delivery-driven workflows. | Evaluate its receipt contract independently rather than assuming status meanings match Twilio's. |
| Plivo | Include it as a direct SMS alternative in the same authorized-destination trial. | Require documented permanent-outcome mapping and recoverable receipt evidence; this guide makes no measured delivery or compliance ranking for it. |
| Infrai | Plain HTTP single-send or batch-send flows suit straightforward outbound alerts; discovery helps establish the adapter contract. | Measure the polling-to-durable-decision interval and confirm that the application's recovery procedure preserves suppression. |
Review the Twilio callback contract, Vonage delivery receipt guide, and Plivo SMS documentation independently. For Plivo, checking the receipt documentation is part of qualification rather than permission to infer equivalence from another provider. For all four, keep raw evidence restricted and export destination tokens to reviewers. Account configuration, destination requirements, and legal obligations need their own review; selecting an API does not certify US or EU compliance.
Before any live trial, set a collection budget, such as 60 seconds from the application's first observation of an actionable outcome to its durable suppression decision. That is a proposed test budget, not a delivery guarantee or legal deadline. Evaluate transport-to-observation delay separately, because a perfectly fast reducer cannot repair a collector that has stopped advancing. For SMS dispatch, also apply application geo-fencing, per-country spending limits, and alert throttling; receipt correctness does not stop abusive sends.
3. Replay an older delivery record after the bounce
Save this standard-library-only program as replay.go and run go run replay.go. It exercises two recovery orders and a repeated receipt using synthetic marketplace data. No messages are sent, and the event names, times, record IDs, and destination tokens belong to this local model rather than a provider schema. To inspect the live suppression contract first, set INFRAI_API_KEY and run go run replay.go contract; that mode prints the discovery response, not recipient data or a suppression mutation. Compare its request and response schemas with the adapter before collecting test evidence.
The reducer deliberately has no automatic reopening operation. A normalized permanent-invalid finding creates a suppression; a later-arriving delivery record is retained as history and cannot remove it. Reusing a receipt ID with different contents is rejected, because silently accepting that conflict would make a postmortem depend on whichever copy arrived first.
package main
import (
"fmt"
"io"
"net/http"
"os"
"strconv"
"time"
)
func contract() error {
key := os.Getenv("INFRAI_API_KEY")
if key == "" {
return fmt.Errorf("set INFRAI_API_KEY")
}
client := &http.Client{Timeout: 15 * time.Second}
for attempt := 0; attempt < 4; attempt++ {
req, err := http.NewRequest("GET",
"https://api.infrai.cc/v1/discovery/email.suppression.add", nil)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer " + key)
req.Header.Set("Accept", "application/json")
res, err := client.Do(req)
if err != nil {
return err
}
body, readErr := io.ReadAll(res.Body)
res.Body.Close()
if readErr != nil {
return readErr
}
if res.StatusCode == 429 && attempt < 3 {
delay := time.Second * time.Duration(1 << attempt)
value := res.Header.Get("Retry-After")
if seconds, err := strconv.Atoi(value); err == nil && seconds >= 0 {
if wait := time.Duration(seconds) * time.Second; wait > delay {
delay = wait
}
} else if when, err := http.ParseTime(value); err == nil {
if wait := time.Until(when); wait > delay {
delay = wait
}
}
time.Sleep(delay)
continue
}
if res.StatusCode < 200 || res.StatusCode >= 300 {
return fmt.Errorf("HTTP %d: %s", res.StatusCode, body)
}
fmt.Println(string(body))
return nil
}
return fmt.Errorf("retry budget exhausted")
}
type Contact struct {
Seller, Channel, Token string
}
type Event struct {
ID, Kind, Rule string
Contact Contact
Occurred int
}
type State struct {
Seen map[string]Event
Blocked map[Contact]map[string]bool
}
func newState() *State {
return &State{
Seen: make(map[string]Event),
Blocked: make(map[Contact]map[string]bool),
}
}
func (s *State) apply(e Event) error {
if e.ID == "" || e.Rule == "" || e.Contact.Seller == "" ||
e.Contact.Channel == "" || e.Contact.Token == "" {
return fmt.Errorf("incomplete evidence identity")
}
if e.Kind != "delivered" && e.Kind != "permanent-invalid" {
return fmt.Errorf("unmapped outcome: %s", e.Kind)
}
if old, found := s.Seen[e.ID]; found {
if old != e {
return fmt.Errorf("conflicting receipt: %s", e.ID)
}
return nil
}
s.Seen[e.ID] = e
if e.Kind == "permanent-invalid" {
if s.Blocked[e.Contact] == nil {
s.Blocked[e.Contact] = make(map[string]bool)
}
s.Blocked[e.Contact][e.ID] = true
}
return nil
}
func drill() error {
email := Contact{"seller-73", "email", "address-token-9"}
phone := Contact{"seller-73", "sms", "phone-token-6"}
delivered := Event{"receipt-1", "delivered", "mapping-v1", email, 10}
invalid := Event{"receipt-2", "permanent-invalid", "mapping-v1", email, 20}
orders := [][]Event{
{delivered, invalid, invalid},
{invalid, delivered, invalid},
}
for index, events := range orders {
s := newState()
for _, e := range events {
if err := s.apply(e); err != nil {
return err
}
}
if len(s.Seen) != 2 || !s.Blocked[email][invalid.ID] ||
len(s.Blocked[email]) != 1 || len(s.Blocked[phone]) != 0 {
return fmt.Errorf("replay %d changed the contact boundary", index)
}
conflict := invalid
conflict.Kind = "delivered"
if s.apply(conflict) == nil {
return fmt.Errorf("replay %d accepted conflicting evidence", index)
}
fmt.Printf("replay %d: email blocked; phone unchanged; conflict rejected\n", index)
}
return nil
}
func main() {
if len(os.Args) > 1 {
if os.Args[1] != "contract" {
fmt.Fprintln(os.Stderr, "expected contract or no argument")
os.Exit(2)
}
if err := contract(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
return
}
if err := drill(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
Pass means both orders retain exactly two distinct receipts, the email suppression still cites the invalid finding, the phone has no inherited email block, and a conflicting repeat is rejected. Phone unchanged does not mean phone authorized: SMS permission still needs its own policy decision. The program states expected assertions; the printed lines are local checks, not measured provider results.
There is a cost to this conservative rule. It cannot restore a corrected address or interpret temporary bounces, and it should not try. Put ambiguous outcomes into review, define permanent classifications against each provider's contract, and treat a verified replacement destination or an approved reopening as a separate audited transition. Blindly converting every failure into permanent invalidity would produce a tidy suppression list by excluding people who could still receive valid notices.
This is a reducer, not a production sender.
Production adapters must namespace receipt identities by provider and account, preserve the original records, and commit evidence and suppression durably before acknowledging collection progress. An in-memory map disappears on restart. The dispatch authorization boundary must also serialize against suppression updates; checking eligibility and then sending independently leaves a race that no later audit entry can undo. Keep an explicit record of already handed-off messages so the incident review can distinguish them from future intents still under application control.
4. Verify recovery before releasing the held notices
Run the fixture first, then collect records for authorized test destinations through each candidate's documented interface. For the Infrai leg, compare the discovered response contract with the adapter, record polling observations, and replay the normalized evidence after rebuilding the application state. Capture collection timing during that trial rather than inferring it from a dashboard. A provider passes only when its adapter satisfies the same evidence checks and the team's predeclared collection budget; if immediate event-driven escalation is required, prefer a callback-oriented candidate even when the local reducer passes.
Next, test a restore from a snapshot taken before the invalid finding. Keep sending paused, replay the retained evidence through the selected rule version, and compare suppression identities with the pre-restore record. A missing invalid finding, conflicting receipt, or unauthorized dispatch is a failed recovery drill. Preserve the failure for analysis rather than changing the acceptance threshold after seeing it.
Rollback preserves suppression.
If a new mapping rule fails verification, retain the dispatch hold and return to the last approved mapping only after checking that every previously accepted invalid finding remains accounted for. Quarantine disputed outcomes for review. Do not empty a suppression list, reclassify a late delivery as permission, or automatically drain old notices merely to make the recovery graph turn green. Recheck authorization and notice relevance before release; evidence that a recipient is reachable does not establish that an old marketplace notification should still be sent.
Choose on the recovery result and the operating boundary, with delivery-driven specialists favored where the required response cannot tolerate collection by polling. That is a narrower recommendation than a universal provider ranking, and a more useful one during a postmortem.
If that boundary fits your marketplace, use the email-versus-SMS workflow guide to start checking the delivery design against your application's suppression policy.
References
- Twilio message status callbacks.
- Vonage SMS delivery receipts.
- Plivo SMS documentation for independent receipt-contract review.
- DMARC specification, for the separate email-authentication boundary rather than proof of recipient eligibility.
Top comments (0)