Unable to Remove urlLifetimeInSeconds from Email Template - PUT Endpoint not Replacing Record Fully Loading

Problem statement

It is not possible to manage the urlLifetimeInSeconds property on the EmailTemplate resource. It is not being removed. When trying to remove the urlLifetimeInSeconds variable, the PUT endpoint does not update the variable.

Symptoms

  • Trying to remove the urlLifetimeInSeconds variable from an email template that does not require it
  • PUT endpoint does not update variable.

Cause

This is due to a current issue that the PUT endpoint for email templates does not perform a full replace as expected for this HTTP Verb.

Solution

There is a known bug (last updated 30th Jan 24) with the PUT Email Templates endpoint not fully replacing the record. Until this is fixed, variables that have been set can only have their values modified and not removed.

If a urlLifetimeInSeconds variable is set for a template that does not require it, such as a welcome email, this will not cause an issue and can be left in place. Only the Verification Email, Change Password, and Blocked Account Email templates use this variable.