curl -X POST "https://api.getbrew.ai/v1/transactional" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionalId": "te_password_reset",
    "email": "user@example.com",
    "dataVariables": {
      "firstName": "Sarah",
      "resetUrl": "https://app.example.com/reset?token=abc123"
    }
  }'

What are Transactional Emails?

Transactional emails are automated messages sent to individual users based on specific actions they take—like password resets, order confirmations, or account notifications. Unlike marketing emails, they contain essential information users need regardless of their subscription preferences.

Key characteristics:

  • Triggered by user actions (not promotional campaigns)
  • Always delivered, even to unsubscribed contacts
  • Don’t require unsubscribe links (CAN-SPAM compliant)
  • Focus on functionality, not marketing

When contacts unsubscribe from your marketing emails, Brew automatically skips them for campaigns and automations but still delivers transactional emails since they contain essential information needed for using your service. This approach complies with CAN-SPAM regulations, which distinguish between marketing and transactional content.

When Should I Use Transactional Emails?

Essential for user account management:

  • Password reset emails
  • Email verification
  • Login notifications
  • Two-factor authentication codes
  • Security alerts

Always transactional - users need these to use your service.

Quick Decision Guide

Ask yourself: “Can the user complete essential tasks without this email?”

  • No → Transactional (password reset, order receipt)
  • Yes → Marketing email (newsletter, product updates)

Legal requirement: If your email contains ANY promotional content, it must follow marketing email regulations including unsubscribe links per CAN-SPAM, GDPR, and CASL.

How to Create and Send Transactional Emails

1

Create your email with AI

Describe what you need and Brew generates an on-brand transactional email with proper data variables and responsive design.

2

Add data variables

Insert dynamic content like names, URLs, or order details using Brew’s data variable system.

3

Publish and get your ID

Publish your email to get a unique ID for API calls.

4

Send via API

Use Brew’s API to send personalized emails with your data.

Create with AI

Instead of building emails from scratch, tell Brew what you need:

Example prompts:

  • “Create a password reset email with a secure link and security tips”
  • “Draft an order confirmation with order details and tracking info”
  • “Make an account verification email with a confirmation button”

Brew generates complete emails with proper security messaging, clear instructions, and your brand styling.

Add Data Variables

Data variables insert personalized content into each email:

Common variables:

  • {DATA_VARIABLE:firstName} - Recipient’s name
  • {DATA_VARIABLE:resetUrl} - Password reset link
  • {DATA_VARIABLE:orderNumber} - Order confirmation
  • {DATA_VARIABLE:verificationLink} - Account verification URL

Adding variables:

  1. Use the Insert data variable button in the editor
  2. Type them directly: {DATA_VARIABLE:variableName}
  3. Add to text, links, buttons, or subject lines

Publish and Send

  1. Review your email - Check variables and content
  2. Click “Publish” - Gets your unique transactional ID
  3. Copy the API payload - Use this for your integration

API Examples

Basic Password Reset

curl -X POST "https://api.getbrew.ai/v1/transactional" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionalId": "te_password_reset",
    "email": "user@example.com",
    "dataVariables": {
      "firstName": "Sarah",
      "resetUrl": "https://app.example.com/reset?token=abc123"
    }
  }'

With Contact Management

curl -X POST "https://api.getbrew.ai/v1/transactional" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionalId": "te_welcome",
    "email": "newuser@example.com",
    "addToAudience": true,
    "firstName": "Alex",
    "subscriptionGroups": {
      "sg_newsletter": true
    },
    "dataVariables": {
      "firstName": "Alex",
      "dashboardUrl": "https://app.example.com/dashboard"
    }
  }'

Contact behavior: Transactional emails don’t automatically add recipients to your marketing audience. Set addToAudience: true if you want them added for future marketing emails.

Testing and Troubleshooting

Safe Testing

Use these special test domains that won’t affect your sending reputation:

  • test@example.com
  • test@test.com

These return success responses without sending actual emails.

Common Issues

Best Practices

Content Guidelines

  • Be clear and direct - Users expect immediate, actionable information
  • Include your branding - Build trust with consistent design
  • Explain the trigger - “You’re receiving this because you requested a password reset”
  • Provide support contact - Never use “no-reply” addresses

Technical Best Practices

Monitoring

Track key metrics in your Transactional dashboard:

  • Sends - Total emails sent
  • Delivered - Successfully delivered emails
  • Bounces - Failed deliveries
  • Spam complaints - Recipients marking as spam

Open and click tracking is disabled by default for transactional emails to improve deliverability and focus on essential communications.

API Reference

For complete API documentation, including all parameters and error codes, see our Transactional Email API Reference.

Need Help?

Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:

Search Documentation

Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.

AI Assistant Chat

Click the sparkle ✨ icon next to the “Ask any question” search bar in the top left to chat with our AI assistant that’s been trained on our entire documentation.

ChatGPT/Claude Integration

Click “Open in ChatGPT” at the top right of any page to analyze documentation with ChatGPT or Claude for deeper insights.