Why serverless?
Fast deployment
Deploy globally in minutes with minimal infra setup.
Pay per execution
Only pay for requests you actually process.
Edge proximity
Reduce latency by running close to your users.
Simple scaling
Handle traffic spikes without manual autoscaling work.
Supported guides
Vercel Functions
Build a POST endpoint and send SMS with
@rewritetoday/sdk.Cloudflare Workers
Send SMS from an edge worker using
@rewritetoday/sdk.Supabase Edge Functions
Send SMS from a Supabase edge function with
@rewritetoday/sdk.Common pattern
All serverless runtimes follow the same flow:- Read secrets from env bindings
- Instantiate
Rewrite - Validate request payload
- Call
rewrite.messages.send(...) - Return JSON response with proper status code
Keep your API key server-side only. Never expose
REWRITE_API_KEY in client bundles.