Management API Returns 404 Error When Accessing when Trying to Access Email Templates
This article explains why the following error occurs when attempting to retrieve or modify email templates using the Management Application Programming Interface (API). This issue arises when an email template in the Auth0 Dashboard has never been customized or updated.
404 Not Found
- Auth0 Dashboard
- Management API
- Email Templates
The error occurs because an email template does not technically exist as a record for the Management API until it has been customized. If a template remains in its default state without any updates, the API cannot retrieve or modify the record.
To resolve this issue, the template must be initialized in the Auth0 Dashboard. Use the following steps to make the template accessible via the Management API:
- Navigate to the Auth0 Dashboard.
- Select the desired email template.
- Make a slight change to the Hypertext Markup Language (HTML) content.
- Select Save.
The following list provides the mapping of Auth0 User Interface (UI) templates to their corresponding Management API names:
- Verification Email (link): verify_email
- Verification Email (code): verify_email_by_code
- Welcome Email: welcome_email
- Enroll Multifactor Authentication: enrollment_email
- Change Password (link): reset_email
- Change Password (code): reset_email_by_code
- Blocked Account Email: blocked_account
- Password Breach Alert: stolen_credentials
- Verification Code for Email MFA: mfa_oob_code
- User Invitation: user_invitation
NOTE: The following legacy entries are not supported for new tenants and will consistently return a 404 error, as current implementations utilize specific link or code templates:
- Management API: password_reset
- Management API: change_password