Skip to main content
This guide shows how to send SMS using Rewrite inside a Supabase Edge Function.

1. Install the SDK

2. Configure environment variables

Set your API key as a secret in Supabase:

3. Create the edge function

supabase/functions/send-sms/index.ts

4. Test locally

5. Deploy

If your function is public, add app-level auth/rate limits to avoid abuse.