Rewrite
SMS infrastructure I co-founded as CTO. Sold four months in.
Transactional SMS in Brazil means carrier contracts, opaque pricing, and integrations measured in weeks. Rewrite compressed that to a single SDK install and an API key:
bun add rewritetoday
# npm install rewritetoday | pnpm add rewritetodaySending a message returns a result object: no try/catch, no 200-with-error-in-body surprises. Every message gets a delivery timeline you can query or forward as a signed webhook:
import { Rewrite } from 'rewritetoday';
const rewrite = new Rewrite(process.env.REWRITE_API_KEY);
const { data, error } = await rewrite.messages.send({
to: '+551234567890',
content: 'Hey, Rewrite is here!',
});The CLI proxies delivery webhooks to your local server during development: the same events production sends, without a public URL:
rewrite login
rewrite listen --forward-to http://localhost:3000/webhooks/rewriteContext#
Transactional SMS in Brazil is sold through carrier contracts, opaque pricing and integrations measured in weeks. Every product team ends up rebuilding the same plumbing: retries, delivery receipts, OTP expiry, per-message auditing, and every one of them gets it slightly wrong the first time. The business impact is immediate: a message that does not arrive is a login that does not happen and a sale that does not close.
Approach#
I designed Rewrite as an API-first platform: a small HTTP surface, official SDKs, a CLI for local testing, a sandbox that behaves like production, signed webhooks for delivery events, and a dashboard built on the same public API our customers used. Sending is queue-backed on BullMQ and Redis, so a carrier outage becomes a retry with backoff instead of a lost message, and every message carries a full, auditable delivery timeline.
Engineering decisions#
- Idempotency keys on every send: a retried request can never charge a customer twice or deliver the same OTP twice.
- Queue-backed delivery with exponential backoff, so a carrier incident degrades latency instead of dropping messages.
- Webhooks signed and replayable, because integrators need to trust the event before they build billing on top of it.
- SDKs generated from a single spec, which kept every language at feature parity without a release train per language.
- The dashboard was built on the public API: if a flow was awkward for us, it was awkward for the customer.
Outcome#
Rewrite went from idea to paying customers and became real infrastructure for businesses that need programmable SMS, campaigns, webhooks and sandbox environments. It generated R$ 10k+ in revenue from real customers and was sold for R$ 40k, a product I designed, built and handed over running.
The full story, chapter by chapter, is in my experience.