# Add or update template Create or update an email template for your environment. Specify the email template using the type parameter. The value of type must match one of the predefined Frontegg email templates. Set the sender using the senderEmail parameter, and optionally include values for the other available body parameters. Provide the template information in the request body. A valid environment token is required to call this endpoint. You can obtain it from the environment authentication route. Endpoint: POST /resources/mail/v1/configs/templates Security: bearer ## Request fields (application/json): - `type` (string, required) Enum: "ResetPassword", "ActivateUser", "InviteToTenant", "PwnedPassword", "MagicLink", "OTC", "ConnectNewDevice", "UserUsedInvitation", "ResetPhoneNumber", "BulkInvitesToTenant", "MFAEnroll", "MFAUnenroll", "NewMFAMethod", "MFARecoveryCode", "RemoveMFAMethod", "EmailVerification", "BruteForceProtection", "SuspiciousIP", "MFAOTC", "ImpossibleTravel", "BotDetection", "SmsAuthenticationEnabled", "UnlockUser", "UnlockUserSuccess", "ActivateUserWithCode", "InviteToTenantWithCode", "VerifyNewEmail", "EmailAddressChanged", "ApprovalFlowApprove" - `senderEmail` (string) - `subject` (string) - `fromName` (string) - `redirectURL` (string) Only required for: ResetPassword, ActivateUser, InviteToTenant, MagicLink, BulkInvitesToTenant - `htmlTemplate` (string) - `successRedirectUrl` (string) - `active` (boolean) ## Response 201 fields