Skip to Content
Brandedmail 1.0 release 🎉
Templates

Templates

Brandedmail includes a set of built-in templates so you can send common product emails without designing them yourself.

All template sends share the same base fields:

  • from – sender email (must be from a verified domain or our subdomain like [email protected])
  • to – recipient email
  • brandId – the brand this email should use (colors, logo, etc.)
  • subject – email subject
  • template – which template to use
  • data – template-specific payload

The template field can be one of:

  • "welcome"
  • "trial-ending"
  • "reset-password"
  • "login-alert"
  • "email-verification"

Welcome

Template: welcome

type WelcomeData = { firstName: string; message: string; cta: { label: string; url: string; }; };

Example (Node SDK):

import Brandedmail from "@brandedmail/node"; const client = new Brandedmail(process.env.BRANDEDMAIL_API_KEY!); await client.sendTemplate({ template: "welcome", from: "[email protected]", to: "[email protected]", brandId: "your-brand-id", subject: "Welcome to Brandedmail", data: { firstName: "Ada", message: "Thanks for signing up to Brandedmail!", cta: { label: "Get started", url: "https://brandedmail.app/dashboard", }, }, });

Example (HTTP):

curl https://api.brandedmail.app/emails \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template": "welcome", "from": "[email protected]", "to": "[email protected]", "brandId": "your-brand-id", "subject": "Welcome to Brandedmail", "data": { "firstName": "Ada", "message": "Thanks for signing up to Brandedmail!", "cta": { "label": "Get started", "url": "https://brandedmail.app/dashboard" } } }'

Trial ending

Template: trial-ending

type TrialEndingData = { daysLeft: number; expiryDate: string; upgradeUrl: string; };

Example (Node SDK):

await client.sendTemplate({ template: "trial-ending", from: "[email protected]", to: "[email protected]", brandId: "your-brand-id", subject: "Your trial is ending soon", data: { daysLeft: 3, expiryDate: "2026-03-01", upgradeUrl: "https://brandedmail.app/upgrade", }, });

Example (HTTP):

curl https://api.brandedmail.app/emails \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template": "trial-ending", "from": "[email protected]", "to": "[email protected]", "brandId": "your-brand-id", "subject": "Your trial is ending soon", "data": { "daysLeft": 3, "expiryDate": "2026-03-01", "upgradeUrl": "https://brandedmail.app/upgrade" } }'

Reset password

Template: reset-password

type ResetPasswordData = { resetUrl: string; expiryMinutes: number; };

Example (Node SDK):

await client.sendTemplate({ template: "reset-password", from: "[email protected]", to: "[email protected]", brandId: "your-brand-id", subject: "Reset your password", data: { resetUrl: "https://yourapp.com/reset?token=...", expiryMinutes: 30, }, });

Example (HTTP):

curl https://api.brandedmail.app/emails \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template": "reset-password", "from": "[email protected]", "to": "[email protected]", "brandId": "your-brand-id", "subject": "Reset your password", "data": { "resetUrl": "https://yourapp.com/reset?token=...", "expiryMinutes": 30 } }'

Login alert

Template: login-alert

type LoginAlertData = { device: string; location: string; ip: string; time: string; };

Example (Node SDK):

await client.sendTemplate({ template: "login-alert", from: "[email protected]", to: "[email protected]", brandId: "your-brand-id", subject: "New login to your account", data: { device: "Chrome on macOS", location: "Paris, France", ip: "203.0.113.42", time: new Date().toISOString(), }, });

Example (HTTP):

curl https://api.brandedmail.app/emails \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template": "login-alert", "from": "[email protected]", "to": "[email protected]", "brandId": "your-brand-id", "subject": "New login to your account", "data": { "device": "Chrome on macOS", "location": "Paris, France", "ip": "203.0.113.42", "time": "2026-02-13T10:15:00.000Z" } }'

Email verification

Template: email-verification

type EmailVerificationData = { otp: string; expiryMinutes: number; };

Example (Node SDK):

await client.sendTemplate({ template: "email-verification", from: "[email protected]", to: "[email protected]", brandId: "your-brand-id", subject: "Verify your email", data: { otp: "123456", expiryMinutes: 10, }, });

Example (HTTP):

curl https://api.brandedmail.app/emails \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template": "email-verification", "from": "[email protected]", "to": "[email protected]", "brandId": "your-brand-id", "subject": "Verify your email", "data": { "otp": "123456", "expiryMinutes": 10 } }'