Skip to main content
This guide shows how to send SMS using Rewrite inside a Cloudflare Worker.

1. Install the SDK

2. Configure environment variables

Set your API key in wrangler.toml secrets:

3. Create the worker

src/index.ts

4. Test locally

5. Deploy

Workers are ideal for low-latency edge-triggered sends, but you should still add retries and idempotency in your app layer.