This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves email marketing account details.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function getAccountDetails(): Promise<GetAccountDetailsResponse>;
import { accountDetails } from "wix-email-marketing.v2";
export async function myGetAccountDetailsFunction() {
try {
const results = await accountDetails.getAccountDetails();
console.log("Success! Retrieved results:", results);
return results;
} catch (error) {
console.error(error);
}
}
/* Promise resolves to:
* {
* "accountDetails": {
* "status": "ACTIVE",
* "package": {
* "_id": "EmailMarketing_Professional",
* "group": "EmailMarketing",
* "monthlyQuotaAllocation": {
* "campaigns": -1,
* "emails": 5000
* }
* },
* "quotaPeriod": {
* "dateFrom": "2023-08-10T15:57:10.000Z",
* "dateTo": "2023-09-10T15:57:10.000Z",
* "quotaUsage": {
* "campaigns": 4,
* "emails": 2
* }
* }
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.