The Emails APIs enable you to manage email functionality for a site, including marketing campaigns and sender information. With these APIs, you can publish campaigns to contact lists, track campaign performance, manage sender details and verified email addresses, and retrieve information about a site's email marketing account.
The Emails APIs include the following:
- Account Details API: Retrieves key information about a site's email marketing account, including account status, available sending quota, and other relevant details. Available regardless of account status.
- Campaign API: Creates, manages, and publishes email marketing campaigns. Retrieves campaign statistics and recipients; publishes campaigns to contact lists; sends test emails; reschedules campaigns; and reuses existing campaigns.
- Sender Details API: Manages senders for all types of emails. Creates, updates, and deletes sender details that consist of a name and a verified email address. Multiple senders per site allow emails to come from addresses associated with specific parts of your business.
- Sender Emails API: Creates and verifies email addresses for use across all email types. Manages the verification process to help ensure that "from" and "reply to" addresses are properly authenticated before being used in sender details.
These APIs work together to support common workflows for setting up and sending emails. For example, you can use the Sender Emails API to verify an email address, then use the Sender Details API to create a sender with that verified email, and finally use the Campaign API to create and publish a campaign using those sender details.
The Sender Details and Sender Emails APIs can be used independently for any type of email. For email marketing campaigns specifically, you can combine them with the Email Marketing APIs in the following workflow:
- Verify sender emails: Use the Sender Emails API to create and verify email addresses that are used as "from" and "reply to" addresses.
- Create sender details: Use the Sender Details API to create senders by combining a name with a verified email address.
- Manage campaigns: Use the Campaign API to create, manage, and publish email marketing campaigns.
- Monitor account status: Use the Account Details API to check a site's email marketing account status, available quota, and help ensure campaigns can be sent.
It's important to note the following points before starting to code:
- Each site must have an active email marketing account to create and send marketing campaigns using the Campaign API.
- When a verified email uses a public mailbox provider domain (for example @gmail, @yahoo, or @outlook), the "from" address appears as a Wix-authenticated address to help ensure deliverability, and the verified email appears as the "reply to" address.
- Campaign statistics become available a few minutes after distribution. You can retrieve statistics using the Campaign API's List Statistics method or by including statistics when calling Get Campaign.
- A site's email marketing account can be suspended if the Wix Email Marketing Terms of Use are breached. If an account is suspended, a Wix user must visit the site's email marketing account on the site dashboard and follow the instructions to restore access.
- Each site has a monthly quota for marketing campaigns and emails. The quota is determined by the site's email marketing plan and rolls over each month. You can retrieve quota information using the Account Details API.
- Access to the Email Marketing APIs depends on a site's email marketing account status:
- Account Details API: Available regardless of account status.
- Campaign API: Available only when the email marketing account status is ACTIVE and the sending quota hasn't been reached.
- Sender Details and Sender Emails APIs: Available regardless of account status, for all email types.
- Campaign: Email marketing message designed to be distributed to an audience. You can use campaigns to deliver promotions, announcements, or newsletters to site contacts and track their performance with the Campaign API.
- Template: Predefined structure for creating marketing campaigns. You can use templates to quickly build consistent campaign content by replacing placeholders with specific values to customize messaging and layout.
- Quota: Monthly limit of marketing campaigns and emails that can be sent, determined by the site's email marketing plan. You can retrieve quota information with the Account Details API and monitor usage to avoid exceeding plan limits.
- Account status: State of the email marketing account (
ACTIVE or SUSPENDED) that determines Campaign and Account Details API accessibility. You can check the account status with the Account Details API to confirm whether sending and management operations are permitted.
- Audience: Group of recipients targeted by a marketing campaign, typically site contacts. You can build and target audiences using contact lists and labels to deliver campaigns to specific segments of a site's contacts.
- Sender details: Combination of a name and a verified email address used to identify the sender of any type of email. You can create, update, and manage sender details so email recipients see the correct sender name and verified address when receiving emails.
- Sender email: Verified email address used as the "from" or "reply to" address for any type of email. You can verify sender emails with the Sender Emails API before adding them to sender details to help ensure proper authentication and deliverability.