updateSenderDetails( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates sender details.

If the fromEmail is changed, a verification code will be sent to the new email address.

If verification is needed, a verification email will be sent to the user, and the returned verificationNeeded value will be true.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Email Marketing
Learn more about app permissions.
Method Declaration
Copy
function updateSenderDetails(
  senderDetails: SenderDetails,
): Promise<UpdateSenderDetailsResponse>;
Method Parameters
senderDetailsSenderDetailsRequired

New sender details.

Returns
Return Type:Promise<UpdateSenderDetailsResponse>
JavaScript
import { senderDetails } from "wix-email-marketing.v2"; // Sample object: // { // "senderDetails": { // "fromName": "User", // "fromEmail": "newemail@address.com" // } // } export async function myUpdateSenderDetailsFunction(senderDetails) { try { const result = await senderDetails.updateSenderDetails; console.log(`Success! SenderDetails updated.`); return result; } catch (error) { console.error(error); } } /* Promise returns: * { * verificationNeeded: true * } */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?