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

1. Install the SDK

2. Configure environment variables

Add your API key in Vercel Project Settings:

3. Create the function

app/api/send-sms/route.ts

4. Test locally

5. Deploy

For high-volume flows, enqueue requests and send asynchronously to avoid function timeout limits.