From install to first email in under 5 minutes
Install the SDK, set your API key, and send your first email.
Last updated April 2026
Three steps to your first send
1
Install the SDK
Install the BaviMail SDK for your language.
npm install bavimail2
Set your API key
Create an API key from the dashboard and set it as an environment variable.
export BAVIMAIL_API_KEY="bav_live_your_key_here"API keys start with bav_live_.
3
Send your first email
Initialize the client and send an email.
import { Bavimail } from 'bavimail'
const client = new Bavimail({ apiKey: process.env.BAVIMAIL_API_KEY })
const email = await client.emails.send({
aliasId: 'your-alias-id',
toEmail: 'recipient@example.com',
subject: 'Hello from BaviMail',
body: '<strong>Your first email</strong>',
})
console.log('Sent:', email.id)Copy for Claude
Drop this into your AI coding assistant.
bavimail-quickstartpython
# BaviMail API — Quickstart
# Docs: https://bavimail.com/docs/quickstart
# SDK: pip install bavimail / npm install bavimail
from bavimail import Bavimail
import os
client = Bavimail(api_key=os.environ["BAVIMAIL_API_KEY"])
email = client.emails.send(
alias_id="your-alias-id",
to_email="recipient@example.com",
subject="Hello from BaviMail",
body="<strong>Your first email via BaviMail</strong>",
)
print(f"Sent: {email.id}")
# Auth: API key passed as Bearer token
# Errors: See https://bavimail.com/docs/errors