Send email from Cloudflare Workers
Keep your Brevo API key as a Worker secret and call the Brevo REST API from your Worker to send email, SMS and WhatsApp.

What teams build with Brevo on Cloudflare Workers
Account emails
Transactional emails are automated, non-promotional messages triggered by user actions such as account creation, order confirmations, and password resets. Configure your sending domain and sender before sending emails, see senders and domains.
- A welcome email after signup, from your own domain.
- A password reset or magic link, sent within seconds.
- An invite email when a user adds a teammate.

Set up Brevo in Cloudflare Workers
Create your Brevo API key
In Brevo, open Settings > SMTP & API > API Keys & MCP and click Generate a new API key. The key is displayed once. Verify the sender's email and authenticate the domain so the sender appears as verified.
Worker secrets
Run npx wrangler secret put BREVO_API_KEY, which creates a new version of the Worker and deploys it immediately. Or, in the Cloudflare dashboard, open your Worker > Settings > Variables and Secrets, select Add and choose the type Secret.
Send and check the logs
Your Worker reads secrets through the env parameter of its fetch handler. Call POST https://api.brevo.com/v3/smtp/email with the key in the api-key header; the messageId in the response tracks the email in the transactional email logs.



What you can do with Brevo on Cloudflare Workers
Send transactional email
Transactional emails are automated, non-promotional messages triggered by user actions such as account creation, order confirmations, and password resets. The Free plan includes 300 emails a day.
Manage contacts through the API
Brevo's API manages contacts, tracks custom events, and syncs eCommerce data.
Receive transactional events by webhook
When an event occurs, Brevo sends an HTTP POST request in real time to the notification URL you define. Transactional email events include sent, delivered, opened and clicked.
Beyond email
Brevo's API sends messages across email, SMS, and WhatsApp.



