> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-actions-triggers-prototype.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Customize Multi-factor Authentication SMS and Voice Messages

> Learn how to customize SMS and voice messages sent by Auth0 during enrollment and verification.

To customize multi-factor authentication SMS and voice messages sent by Auth0:

1. Go to [Dashboard > Security > Multi-factor Auth](https://manage.auth0.com/#/security/mfa), and click **Phone Message**.
2. In the **Enrollment Template** or **Verification Template** section, customize your message.
3. Click **Save**.

The **Enrollment Template** defines the message sent when a user enrolls a new device for the first time using MFA. The **Verificiation Template** defines the message sent when a user logs in after enrollment.

## Syntax

[Liquid](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers) syntax is the supported templating engine you use when accessing user attributes in SMS templates. The following attributes are available:

| Attribute                       | Description                                                                                                                                                                                |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `message_type`                  | Indicates which kind of message is sent: `sms` or `voice`.                                                                                                                                 |
| `code`                          | Enrollment/verification code. When sending voice messages, variable values are separated by dots between the digits (`1.2.3.4.5`) for accurate pronunciation by voice messaging providers. |
| `locale`                        | For Universal Login or MFA API. Designates the language.                                                                                                                                   |
| `requestInfo.lang`              | For Classic Login localization. Browser accept-language header. For example: `es-AR,es;q=8.0`, `en-US,en`.                                                                                 |
| `tenant.friendlyName`           | The **Friendly Name** set in **Dashboard > Tenant Settings**.                                                                                                                              |
| `custom_domain.domain`          | The tenant's domain name.                                                                                                                                                                  |
| `custom_domain.domain_metadata` | The custom domain's metadata fields (as key-value pairs).                                                                                                                                  |

An example of using Liquid syntax to send different messages for voice and SMS by language:

```liquid lines theme={null}
{% if message_type == "voice" %}
    {% if locale contains "fr" %}
        Bonjour, vous avez demandé à recevoir un code de vérification pour vous enregister avec {{tenant.friendly_name}}. Votre code est: {{pause}} {{code}}. Je répète, votre code est: {{pause}}{{code}}.
    {% elsif locale contains "es" %}
        Usted ha requerido un código de verificación para inscribirse con {{tenant.friendly_name}}. Su código es: {{pause}}{{code}}. Repito, su código es: {{pause}}{{code}}.
    {% else %}
        Hello, you requested a verification code to enroll with {{tenant.friendly_name}}. Your code is: {{pause}}{{code}}. I repeat, your code is: {{pause}}{{code}}.
    {% endif %}
{% else %}
    {% if locale contains "fr" %}
        {{code}} est votre code de vérification pour vous enregistrer avec {{tenant.friendly_name}}.
    {% elsif locale contains "es" %}
        {{code}} es su código para inscribirse con {{tenant.friendly_name}}.
    {% else %}
        {{code}} is your verification code to enroll with {{tenant.friendly_name}}.
    {% endif %}
{% endif %}
```

## Localization

In the Auth0 Authentication API, the [Get Code or Link endpoint](https://auth0.com/docs/api/authentication/passwordless/get-code-or-link), MFA [Challenge request endpoint](https://auth0.com/docs/api/authentication/muti-factor-authentication/request-mfa-challenge), and MFA [Add an authenticator endpoint](https://auth0.com/docs/api/authentication/muti-factor-authentication/add-an-authenticator) support the `x-request-language` header.

To use it, set your supported languages in **Tenant > Settings** (under **Supported Languages**). When the `x-request-lanuage` header is sent, that locale is available in the `locale` variable in the MFA phone message templates. See [Passwordless Multi-Language Support](/docs/authenticate/passwordless/authentication-methods/sms-otp#multi-language-support) for details.

## Learn more

* [Multi-Factor Authentication (MFA)](/docs/secure/multi-factor-authentication)
* [Configure SMS and Voice Notifications for MFA](/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa)
* [Enroll and Challenge SMS and Voice Authenticators](/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-challenge-sms-voice-authenticators)
