This flow explains how to set up email sending from a custom domain on a Wix site, covering the complete process from email verification through domain authentication.
Make sure you have:
The following diagram shows the full email domain setup flow.

The following steps describe the complete email domain setup process from sender email creation through domain authentication.
Create a sender email address for sending emails from the site.
Note: If the Wix user has already verified their email in the dashboard, skip to Step 4 and get the verified sender email data by calling List Sender Emails. Filter in page code for emails where verified: true.
Action: Call Create Sender Email with the email address.
Result: Sender email is created with verified: false. Save the sender email ID for verification.
Send a verification code to the sender email address.
Note: Steps 2-3 are not necessary if the email address matches the Wix user's verified login email or if the email was purchased from Wix as a business email. In these cases, the email is already verified.
Action: Call Send Verification Code with the sender email ID.
Result: Verification code is sent to the email address. The code typically arrives in a few minutes.
Use the verification code to verify the sender email address.
Action: Call Verify Sender Email with the sender email ID and the code received via email.
Result: Sender email is verified (verified: true). The verified email can now be used to create sender details.
Create sender details that define the display name and from address for email campaigns.
Skip to here if the Wix user has already verified their email in the dashboard: Use the verified email for the List Sender Emails fromEmailAddress property.
Action: Call Create Sender Details with fromName and fromEmailAddress (must be a verified sender email).
Result: Sender details are created. The Sending Domains API is now accessible.
Retrieve the sending domain that matches the sender email's domain.
Action: Call Query Sending Domains. You must filter by domain or by id. Without a filter, the method returns a SENDER_DETAILS_DO_NOT_EXIST error.
Possible results:
NOT_AUTHENTICATED: DNS records are available in the dnsRecords property. Continue to Step 6.INITIALIZING: DNS records are being generated. Implement polling logic to query the domain status every few minutes until status changes to NOT_AUTHENTICATED, and then continue to Step 6.Add the CNAME records from the dnsRecords property to the domain's DNS configuration at the DNS provider.
Note: If Wix manages DNS for the domain (domain purchased from Wix or connected via nameservers), Wix adds DNS records automatically. Manual DNS configuration is only needed for externally managed domains.
Action:
hostName and value from each record in the dnsRecords array.hostName and value, and save the DNS changes.Result: DNS records are added to the domain. DNS changes take time to propagate across the internet (typically a few hours, up to 48 hours).
Confirm DNS records have propagated globally before attempting authentication.
Action: Use DNS lookup tools to verify the CNAME records are visible:
dig {hostName} CNAMEPossible results:
Authenticate the domain to verify ownership after DNS propagation.
Note: If Wix manages DNS for the domain (domain purchased from Wix or connected via nameservers), you don't need to call this method.
Action: Call Authenticate Sending Domain with the sending domain ID.
Possible results:
AUTHENTICATED: Domain is verified. Flow ends (setup complete).Confirm the sending domain is authenticated and ready for sending emails.
Action: Call Get Sending Domain with the sending domain ID.
Result: Response shows the status property as AUTHENTICATED. The custom domain is ready for sending emails with improved deliverability.
After implementing this flow, the custom domain is authenticated and ready for sending emails. Emails sent from addresses using this domain have improved deliverability and domain reputation. Wix users and apps can now send email campaigns and transactional emails using the authenticated domain.