Update the Email Template of Passwordless Email OTP using Management API

Overview

This article explains whether it is possible to programmatically create or update the Email Template used for sending Passwordless Email OTP.

Solution

The email template that is delivered to a user during a passwordless authentication flow is found at the connection level. To update the email template at the connection level, patch the connection via the Management API through this endpoint: Update a connection

Before updating the connection, the recommendation is to first make a GET request to /api/v2/connections/{id} and copy the full options object that’s returned in the response. After updating the email template (options.email.body) include the full (updated) options object as part of the PATCH request. Auth0 recommends going through these steps anytime when updating a connection because failure to include the full options object could result in a breaking change for your connection.