Email Template Reference

On this page

Each page in this section covers one email template: when FusionAuth sends the email, where you assign the template, an example, and every replacement variable the template receives. To write and manage templates, see Create an Email Template.

Default and Example Templates#

FusionAuth ships default templates for many workflows. A new FusionAuth instance lists the defaults in Customizations -> Email Templates , with names that start with [FusionAuth Default]. An instance set up with Kickstart has no defaults, so add the templates you need in the Kickstart file. The page for each of those templates shows the default.

FusionAuth ships no default for the other templates, such as Email Update and Password Update. FusionAuth sends those emails only after you create a template and assign the template. The page for each of those templates shows an example to start from.

Retrieve the Templates as Files#

The default templates live in extractedcode/templates-email in the docs repository, and the examples live in extractedcode/templates-email-examples. To download every default template at once:

$ npx degit FusionAuth/fusionauth-site/astro/extractedcode/templates-email templates-email

Without Node, pull the same folder out of a repository tarball:

$ curl -L https://github.com/FusionAuth/fusionauth-site/archive/refs/heads/main.tar.gz \
  | tar -xz --strip-components=4 fusionauth-site-main/astro/extractedcode/templates-email

Either command writes the templates into a templates-email directory. To download the examples, replace templates-email with templates-email-examples in either command.

Replacement Variables#

Every template receives tenant and baseUrl. Most templates also receive user, and receive application when the request that sends the email identifies an Application. Templates that FusionAuth sends for an event also receive event, the same object a webhook receives for that event.

A variable can be missing or null, so check optional values with the FreeMarker ?? operator, or give a default with !:

[#if application??]
  Welcome to ${application.name}.
[/#if]
Hello ${user.firstName!'there'}.

Templates#

Account

Security Notifications

Admin Two-Factor Method Removed

Learn when FusionAuth sends the email that tells a user an administrator removed a two-factor method, and which variables the template receives.

Breached Password

Learn when FusionAuth sends the email that warns a user about a breached password, and which variables the template receives.

Email Update

Learn when FusionAuth sends the email that tells a user their email address changed, and which variables the template receives.

Login Id Duplicate on Create

Learn when FusionAuth sends the email that tells a user someone tried to sign up with their login Id, and which variables the template receives.

Login Id Duplicate on Update

Learn when FusionAuth sends the email that tells a user another account tried to take their login Id, and which variables the template receives.

Password Reset Success

Learn when FusionAuth sends the email that confirms a password reset, and which variables the template receives.

Password Update

Learn when FusionAuth sends the email that tells a user their password changed, and which variables the template receives.

Threat Detected

Learn when FusionAuth sends the email for a login from a new device or a suspicious login, and which variables the template receives.

Two-Factor Authentication

Learn when FusionAuth sends the email that contains a two-factor code, and which variables the template receives.

Two-Factor Method Added

Learn when FusionAuth sends the email that tells a user a two-factor method was added, and which variables the template receives.

Two-Factor Method Removed

Learn when FusionAuth sends the email that tells a user a two-factor method was removed, and which variables the template receives.