Skip to content
Scalekit Docs
Go to Dashboard

Custom email templates

Feature availability

Custom email templates are currently available upon request. Contact our support team to have this feature enabled for your account.

Scalekit uses default email templates to send authentication emails to your users. You can customize these templates with your own branding and content to provide a consistent experience for your users.

To customize your email templates:

  1. Navigate to Branding > Email Templates in your Scalekit dashboard
  2. Customize the following fields:
    • Subject: The subject line of the email
    • Body: The body content of the email
    • Sender name: The display name for the sender
    • Sender email: The email address used as the sender
    • Reply to email: The email address for replies

Once saved, all subsequent emails will use your customized templates.

Use basic placeholders to personalize emails

Section titled “Use basic placeholders to personalize emails”

You can personalize emails using built-in placeholders. These placeholders are automatically replaced with user-specific information when the email is sent:

  • {{user.name}}: The user’s name
  • {{user.email}}: The user’s email address
  • {{auth_request_id}}: The authentication request ID
  • {{otp}}: The one-time passcode
  • {{magic_link}}: The magic link for authentication

Add template variables for advanced customization

Section titled “Add template variables for advanced customization”

For more advanced personalization, you can use template variables to include custom dynamic content in your emails.

  • Each variable must be a key-value pair
  • Maximum of 30 variables per template
  • All template variables must have corresponding values in the request
  • Avoid using reserved names: otp, expiry_time_relative, link, expire_time, expiry_time

Implement template variables in three steps

Section titled “Implement template variables in three steps”
  1. Create your email template with variables:

    Example email template
    <p>Hello {{ first_name }},</p>
    <p>Welcome to {{ company_name }}.</p>
    <p>Find your onboarding kit: {{ onboarding_resources }}</p>
  2. Include variable values in your authentication request:

    const sendResponse = await scalekit.passwordless.sendPasswordlessEmail(
    "<john.doe@example.com>",
    {
    templateVariables: {
    first_name: "John",
    company_name: "Acme Corp",
    onboarding_resources: "https://acme.com/onboarding"
    }
    }
    );
  3. The sent email will include the replaced values:

    Example email preview
    Hello John,
    Welcome to Acme Corp.
    Find your onboarding kit: https://acme.com/onboarding