Skip to main content
PATCH
/
email-templates
/
{templateName}
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.emailTemplates.update("verify_email", {});
}
main();
{
  "template": "verify_email",
  "body": "<string>",
  "from": "sender@auth0.com",
  "resultUrl": "<string>",
  "subject": "<string>",
  "syntax": "liquid",
  "urlLifetimeInSeconds": 1,
  "includeEmailInRedirect": true,
  "enabled": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

templateName
enum<string>
default:verify_email
required

Template name. Can be verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, async_approval, change_password (legacy), or password_reset (legacy).

Available options:
verify_email,
verify_email_by_code,
reset_email,
reset_email_by_code,
welcome_email,
blocked_account,
stolen_credentials,
enrollment_email,
mfa_oob_code,
user_invitation,
change_password,
password_reset,
async_approval

Body

template
enum<string>
default:verify_email

Template name. Can be verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, async_approval, change_password (legacy), or password_reset (legacy).

Available options:
verify_email,
verify_email_by_code,
reset_email,
reset_email_by_code,
welcome_email,
blocked_account,
stolen_credentials,
enrollment_email,
mfa_oob_code,
user_invitation,
change_password,
password_reset,
async_approval
body
string | null

Body of the email template.

from
string | null
default:sender@auth0.com

Senders from email address.

resultUrl
string | null

URL to redirect the user to after a successful action.

subject
string | null

Subject line of the email.

syntax
string | null
default:liquid

Syntax of the template body.

urlLifetimeInSeconds
number | null

Lifetime in seconds that the link within the email will be valid for.

Required range: x >= 0
includeEmailInRedirect
boolean

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

enabled
boolean | null

Whether the template is enabled (true) or disabled (false).

Response

Template successfully updated.

template
enum<string>
default:verify_email

Template name. Can be verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, async_approval, change_password (legacy), or password_reset (legacy).

Available options:
verify_email,
verify_email_by_code,
reset_email,
reset_email_by_code,
welcome_email,
blocked_account,
stolen_credentials,
enrollment_email,
mfa_oob_code,
user_invitation,
change_password,
password_reset,
async_approval
body
string | null

Body of the email template.

from
string | null
default:sender@auth0.com

Senders from email address.

resultUrl
string | null

URL to redirect the user to after a successful action.

subject
string | null

Subject line of the email.

syntax
string | null
default:liquid

Syntax of the template body.

urlLifetimeInSeconds
number | null

Lifetime in seconds that the link within the email will be valid for.

Required range: x >= 0
includeEmailInRedirect
boolean

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

enabled
boolean | null

Whether the template is enabled (true) or disabled (false).