> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Get # Package: emailMarketing # Namespace: AccountDetailsService # Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/get-account-details.md ## Permission Scopes: Manage Email Marketing: SCOPE.DC-PROMOTE.EMAIL-MARKETING ## Introduction Retrieves email marketing account details. --- ## REST API ### Schema ``` Method: get Description: Retrieves email marketing account details. URL: https://www.wixapis.com/email-marketing/v1/account-details Method: GET Return type: GetAccountDetailsResponse - name: accountDetails | type: AccountDetails | description: Current account details. - name: status | type: Enum | description: Account status. - enum: - ACTIVE: Able to use email marketing normally. - WARNED: Must explicitly agree to terms of use to activate the account. - SUSPENDED: Must fill out compliance questionnaire, unable to use email marketing. - BANNED: Must fill out compliance questionnaire, unable to use email marketing. - SUSPENDED_AUTOLIFT: Must fill out compliance questionnaire to activate the account. - name: package | type: Package | description: Current premium package information. - name: id | type: string | description: Package GUID. - name: group | type: string | description: Package group. - name: monthlyQuotaAllocation | type: Quota | description: Allocated quota per month. - name: campaigns | type: integer | description: Number of allocated marketing campaigns per month (-1 means unlimited). - name: emails | type: integer | description: Number of allocated individual emails per month. - name: quotaPeriod | type: QuotaPeriod | description: Quota period and usage. - name: dateFrom | type: string | description: Current quota period start date. - name: dateTo | type: string | description: Current quota period end date - after which quota will roll over. - name: quotaUsage | type: Quota | description: Information about allocated quota already used in this period. - name: maxCampaignAudienceSize | type: integer | description: Max number of recipients for an email marketing campaign. Exceeding this limit may lead to campaigns being rejected. ``` ### Examples ### Get Campaign ```curl curl -X GET 'https://www.wixapis.com/email-marketing/v1/campaigns/98b5a0b3-549b-4e58-b933-a8bd40923a14' \ -H 'Authorization: ' ``` ### Get ```curl ~~~cURL curl -X GET 'https://www.wixapis.com/email-marketing/v1/account-details' \ -H 'Authorization: ' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.emailMarketing.AccountDetailsService.get() Description: Retrieves email marketing account details. Return type: PROMISE - name: accountDetails | type: AccountDetails | description: Current account details. - name: status | type: Enum | description: Account status. - enum: - ACTIVE: Able to use email marketing normally. - WARNED: Must explicitly agree to terms of use to activate the account. - SUSPENDED: Must fill out compliance questionnaire, unable to use email marketing. - BANNED: Must fill out compliance questionnaire, unable to use email marketing. - SUSPENDED_AUTOLIFT: Must fill out compliance questionnaire to activate the account. - name: package | type: Package | description: Current premium package information. - name: _id | type: string | description: Package GUID. - name: group | type: string | description: Package group. - name: monthlyQuotaAllocation | type: Quota | description: Allocated quota per month. - name: campaigns | type: integer | description: Number of allocated marketing campaigns per month (-1 means unlimited). - name: emails | type: integer | description: Number of allocated individual emails per month. - name: quotaPeriod | type: QuotaPeriod | description: Quota period and usage. - name: dateFrom | type: Date | description: Current quota period start date. - name: dateTo | type: Date | description: Current quota period end date - after which quota will roll over. - name: quotaUsage | type: Quota | description: Information about allocated quota already used in this period. - name: maxCampaignAudienceSize | type: integer | description: Max number of recipients for an email marketing campaign. Exceeding this limit may lead to campaigns being rejected. ``` ### Examples ### Get email marketing account details (with elevated permissions) ```javascript import { accountDetails } from "@wix/email-marketing"; import { auth } from "@wix/essentials"; const elevatedGetAccountDetails = auth.elevate(accountDetails.getAccountDetails); export async function myGetAccountDetailsFunction() { try { const results = await elevatedGetAccountDetails(); 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 * } * } * } * } */ ``` ### Get email marketing account details ```javascript import { accountDetails } from "@wix/email-marketing"; 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 * } * } * } * } */ ``` ### getAccountDetails (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { accountDetails } from '@wix/email-marketing'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { accountDetails }, // Include the auth strategy and host as relevant }); async function getAccountDetails() { const response = await myWixClient.accountDetails.getAccountDetails(); }; ``` ---