DhokoAuthaz
DocumentationAPI Reference
  • Get Started

    • Authaz
    • Core Concepts
    • Set up your app
    • Quickstart — cURL
  • Authentication

    • Authentication Settings
    • Signup
    • Invitations
    • Password Authentication
    • Multi-Factor Auth
    • Magic Link
    • OAuth / Social Login
    • Passkey (WebAuthn)
    • SAML SSO
    • Machine-to-Machine (M2M)
    • API Keys
  • Authorization

    • Authorization
    • Resources
    • Policies
    • Roles
    • Access Explorer
  • Tenancy

    • Multi-tenancy
    • Tenancy Customization
  • Brand & Host

    • Branding
    • Custom Domains
    • Communications & Email Templates
  • Operate

    • Users
    • Analytics
    • Audit Logs
    • Application Settings
  • SDK Quickstarts

    • Quickstart — Next.js
    • Quickstart — React SPA
    • Quickstart — Hono
    • Quickstart — .NET (Authaz.Sdk)
  • Recipes

    • Recipes & Cookbook
    • Next.js — first integration
    • Next.js — B2B SaaS (multi-tenant)
    • Hono — first integration
    • Hono — B2B SaaS (multi-tenant)
    • React SPA — first integration
    • React SPA — B2B SaaS (multi-tenant)
    • .NET — first integration
    • .NET — B2B SaaS (multi-tenant)
  • Reference

    • Tokens
    • API Reference
    • Errors & Troubleshooting
  • Documentation

    • How Authaz is Built
  1. Authaz
  2. Docs
  3. Brand & Host
  4. Communications & Email Templates

Brand & Host

Communications & Email Templates

5 min read·Updated May 7, 2026

The Communications tab is where Authaz's emails get configured. It has two sections:

  • Email Provider — connect your sending account (Resend). Authaz uses your account, your domain, your reputation.
  • Email Templates — customize the 12 transactional emails Authaz sends (welcome, magic link, password reset, invitations, account recovery, MFA reset).
curl https://your-app.authaz.io/api/v1/applications/{appId}/email-providers \
  -H "X-API-Key: $AUTHAZ_API_KEY"

A banner at the top of the page reminds you that emails reuse your Branding settings — no need to re-set logo and colors here.

Email provider#

The dashboard supports Resend as the bring-your-own provider.

Why bring your own provider#

  • Deliverability. Emails sent from your domain via your warmed-up sender land in inboxes; emails sent from a generic Authaz sender are more likely to hit spam.
  • Branding. The "From" address is , not something Authaz-flavored.
Previous
Custom Domains
Next
Users
notifications@yourapp.com
  • Cost transparency. You pay your provider directly, see usage in their dashboard.
  • Connecting Resend#

    1. Sign up at resend.com.
    2. Verify your sending domain there (DNS records — Resend walks you through it).
    3. Create an API key in the Resend dashboard.
    4. In Authaz: Communications → Email Provider → Resend → Configure.
    5. Paste the API key, set the From address (notifications@yourapp.com) and an optional reply-to.
    6. Save. Authaz validates by sending a test email to a verification address you provide.
    curl -X PUT https://your-app.authaz.io/api/v1/applications/{appId}/email-providers/resend \
      -H "X-API-Key: $AUTHAZ_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "apiKey": "re_xxxxxxxx",
        "fromEmail": "notifications@yourapp.com",
        "fromName": "Acme",
        "replyTo": "support@yourapp.com"
      }'

    The provider card on the Communications page shows a Configured badge with a green check once it's working, or Not configured with a CTA to set it up.

    What happens if no provider is configured#

    Authaz sends emails through a fallback shared sender to keep development unblocked. The fallback is rate-limited and not suitable for production — emails come from an Authaz domain and may be flagged as spam by stricter mail filters.

    Email templates#

    Authaz ships 12 templates. Each one is a card on the Communications page; click to edit.

    TemplateWhen it sendsVariables
    WelcomeFirst successful sign-in for a new userappName, userEmail, userName, loginUrl
    Magic LinkUser requests a passwordless codeappName, userEmail, magicLink, code, expirationMinutes
    Reset PasswordUser clicks "Forgot password"appName, userEmail, resetLink, code, expirationMinutes
    Password Reset ConfirmationUser completes a password resetappName, userEmail, userName, changedAt
    Signup VerificationNew user completes signupappName, userEmail, verifyLink, code
    InvitationAn admin sends an invitationappName, userEmail, inviterName, inviterEmail, inviteLink, expiresInDays, customMessage
    MFA Reset NotificationAdmin resets a user's MFAappName, userEmail, userName, resetByName
    Account Recovery VerificationUser submits a recovery requestappName, userEmail, code, expirationMinutes
    Account Recovery Admin NotificationRecovery request needs reviewappName, userEmail, requestId, reviewUrl
    Account Recovery ApprovedAdmin approves a recoveryappName, userEmail, userName, recoveryLink
    Account Recovery DeniedAdmin denies a recoveryappName, userEmail, userName, reason
    Account Recovery CompletedUser finishes recoveryappName, userEmail, userName, completedAt

    Each card shows a Customized badge if you've edited the defaults, or Default if it's still the out-of-box copy.

    Editing a template#

    Clicking a template opens the editor with three fields:

    • Subject — the email subject line. Variables are evaluated here too.
    • HTML body — the rich version. The editor uses double-curly variables ({{userEmail}}).
    • Text body — the plain-text fallback for clients that don't render HTML.

    A live preview alongside renders the HTML with sample values, so you can see what arrives in the inbox.

    Variable syntax#

    Authaz uses simple Mustache-style braces:

    <p>Hello {{userName}},</p>
    <p>Click <a href="{{magicLink}}">here</a> to sign in to {{appName}}.</p>
    <p>This link expires in {{expirationMinutes}} minutes.</p>

    If a variable isn't available for a given template (e.g. magicLink doesn't exist on the Welcome email), it renders as an empty string. The editor warns you when you reference a variable not in the template's variable list.

    Conditional sections#

    For optional content, use the {{#if}}…{{/if}} block:

    {{#if customMessage}}
    <blockquote>{{customMessage}}</blockquote>
    {{/if}}

    The block is omitted entirely when the variable is empty.

    API equivalents#

    # Read the current template
    curl https://your-app.authaz.io/api/v1/applications/{appId}/email-templates/magic-link \
      -H "X-API-Key: $AUTHAZ_API_KEY"
     
    # Update
    curl -X PUT https://your-app.authaz.io/api/v1/applications/{appId}/email-templates/magic-link \
      -H "X-API-Key: $AUTHAZ_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "subject": "Your sign-in link to {{appName}}",
        "html": "<p>Click <a href=\"{{magicLink}}\">here</a> to sign in.</p>",
        "text": "Sign in: {{magicLink}}"
      }'
     
    # Reset to default
    curl -X DELETE https://your-app.authaz.io/api/v1/applications/{appId}/email-templates/magic-link \
      -H "X-API-Key: $AUTHAZ_API_KEY"

    Per-tenant overrides#

    In multi-tenant apps, each tenant can override the email provider and/or specific templates. The provider override is useful when one tenant insists on sending from their own domain; template overrides handle "Acme wants more formal copy than our default."

    These are two separate switches under Settings → General → Tenant Customization: Email Templates scope and Email Provider scope. Each one can be Application (one config for everyone) or Per Tenant (each tenant overrides). The two are independent — a common combination is Per-Tenant Templates (each tenant edits copy) with an Application Provider (you handle deliverability for everyone). See Tenancy Customization for the full picture.

    curl -X PUT https://your-app.authaz.io/api/v1/applications/{appId}/tenants/{tenantId}/email-providers/resend \
      -H "X-API-Key: $AUTHAZ_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "apiKey": "re_tenant_specific_key",
        "fromEmail": "notifications@acme.com"
      }'

    A tenant with no override uses the application-level provider and templates.

    Practical tips#

    • Plain-text body matters. Some clients (and most accessibility tooling) render the text body. Don't leave it empty — at minimum, write a one-line version of the HTML.
    • Test with real recipients. Use the dashboard's Send test button (sends to your admin email with sample variables filled in). Spam filters are picky; verify the email actually lands.
    • Watch the subject length. Subjects truncate around 50–70 characters in mobile clients. Front-load the important words.
    • Keep variables stable. Renaming a variable in the template doesn't break anything (Authaz fills what it can), but a wrong variable name leaves a blank spot in the email.

    Next steps#

    • Branding — emails inherit your colors, logo, and font.
    • Magic Link — the most-edited template.
    • Invitations — pair with the invitation template.