# Forgot Password Message Template

Learn when FusionAuth sends the forgot password message, and which variables the template receives.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

FusionAuth sends this message when a user starts the forgot password workflow with a phone number, on the hosted login pages or through the [Forgot Password](https://fusionauth.io/docs/apis/users/forgot-password.md) API. The default template is also known as the Change Password template. Assign the template in **Forgot password** on the Tenants -> Your Tenant -> Identities tab. To override the template for one Application, set the template on the Applications -> Your Application -> Identities tab.

## Default Template

FusionAuth ships the following default template:

```ftl
[#setting url_escaping_charset="UTF-8"]
To change your password click on the following link.

  [#-- The optional 'state' map provided on the Forgot Password API call is exposed in the template as 'state'.
       If we have an application context, append the client_id to ensure the correct application theme when applicable.
  --]
[#assign url = "${baseUrl}/password/change/${changePasswordId}?client_id=${(application.oauthConfiguration.clientId)!''}&tenantId=${user.tenantId}" /]
[#list state!{} as key, value][#if key != "tenantId" && key != "client_id" && value??][#assign url = url + "&" + key?url + "=" + value?url/][/#if][/#list]

${url}

- FusionAuth Admin
```

## Replacement Variables

`application`

*   Type: `Application`

The Application object. For field definitions, see the [Application API](https://fusionauth.io/docs/apis/applications.md).

The variable is present only when the request that sends the message identifies an Application. Check for the variable before you use it:

```ftl
[#if application??]
  ${application.name}
[/#if]
```

`baseUrl`

*   Type: `String`
*   Available since `1.68.0`

The base URL for links in the message. FusionAuth uses the Application **baseURL**, then the Tenant **baseURL**, then `http://localhost:9011`.

`changePasswordId`

*   Type: `String`

The change password Id for the [Change a User's Password](https://fusionauth.io/docs/apis/users/change-password.md) API.

`phoneNumber`

*   Type: `String`
*   Available since `1.59.0`

The phone number FusionAuth sends the message to. The [Generic messenger](https://fusionauth.io/docs/messengers/generic-messenger.md) request has the same value in **`phoneNumber`**.

`state`

*   Type: `Object`

The **`state`** from the forgot password request. The variable is present only when the request includes **`state`**.

`tenant`

*   Type: `Tenant`

The Tenant object. For field definitions, see the [Tenant API](https://fusionauth.io/docs/apis/tenants.md).

`user`

*   Type: `User`

The User object for the recipient. For field definitions, see the [User API](https://fusionauth.io/docs/apis/users.md).

Related

[Email Forgot Password Email Template Learn when FusionAuth sends the forgot password email, and which variables the template receives. forgot password templatechange password templatereset password link](https://fusionauth.io/docs/email/template-reference/account/forgot-password.md)

[Email Email Template Reference Learn about the email templates FusionAuth sends and the replacement variables each template receives. freemarkerforgot password template](https://fusionauth.io/docs/email/template-reference.md)

[APIs Create an Email Template API API documentation for the FusionAuth Create an Email Template API. freemarker](https://fusionauth.io/docs/apis/emails/create-an-email-template.md)

[APIs Email API Learn about the APIs for creating, retrieving, updating and deleting email templates as well as sending emails to users. freemarker](https://fusionauth.io/docs/apis/emails.md)
---

## Other pages in Account

> For the full index of this section, see [Messengers](https://fusionauth.io/docs/llms-messengers.txt).

- [Passwordless Login Message Template](https://fusionauth.io/docs/messengers/template-reference/account/passwordless-login.md): Learn when FusionAuth sends the passwordless login message, and which variables the template receives.
- [Set Up Password Message Template](https://fusionauth.io/docs/messengers/template-reference/account/set-up-password.md): Learn when FusionAuth sends the message that asks a new user to set a password, and which variables the template receives.
- [Verification Complete Message Template](https://fusionauth.io/docs/messengers/template-reference/account/verification-complete.md): Learn when FusionAuth sends the message that confirms a verified phone number, and which variables the template receives.
- [Verification Message Template](https://fusionauth.io/docs/messengers/template-reference/account/verification.md): Learn when FusionAuth sends the message that verifies a user's phone number, and which variables the template receives.
