# 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 Version: 1.0 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) Email of the sender cannot exceed 512 characters - `subject` (string) Subject of the email cannot exceed 512 characters - `fromName` (string) Name of the sender cannot exceed 512 characters - `redirectURL` (string) Only required for: ResetPassword, ActivateUser, InviteToTenant, MagicLink, BulkInvitesToTenant - `htmlTemplate` (string) - `successRedirectUrl` (string) - `active` (boolean) ## Response 201 fields