> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/introduction.md

## Article Content:

# About the Account Details API

With the Account Details API you can retrieve key information about a site's email marketing account, including the account's current status, premium plan details, and email quota for the current period. You can also control how engagement with the site's emails is tracked.

With the Account Details API, you can:

- Retrieve the account's current [status](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/get-account-details.md) and whether campaigns can be sent.
- Retrieve the current [premium plan](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/get-account-details.md) and its monthly quota allocation.
- Retrieve [quota usage](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/get-account-details.md) for the current period.
- Enable or disable [opens tracking](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/update-tracking-settings.md) for the site's emails.

## Account status

The account `status` field indicates whether the site can send email marketing campaigns. An account must be `ACTIVE` before campaigns can be sent.

Possible statuses:

- `ACTIVE`: The account is in good standing. Campaigns can be created and sent.
- `WARNED`: The account owner must accept the terms of use in the Wix Email Marketing dashboard before campaigns can be sent.
- `SUSPENDED`: The account is suspended. The account owner must complete a compliance questionnaire in the Wix Email Marketing dashboard.
- `SUSPENDED_AUTOLIFT`: The account is suspended but may be automatically reinstated after completing a compliance questionnaire in the Wix Email Marketing dashboard.
- `BANNED`: The account is suspended. The account owner must complete a more rigorous compliance questionnaire in the Wix Email Marketing dashboard.

When the status is not `ACTIVE`, campaigns cannot be sent. Resolution requires the site owner to visit the Wix Email Marketing dashboard. There is no public API for changing account status.

## Quota

The `quotaPeriod` field shows the current billing cycle and how much quota has been used:

- `quotaPeriod.dateFrom` and `quotaPeriod.dateTo`: the start and end of the current quota period. Quota always resets on a monthly cycle, regardless of whether the site has a monthly or yearly billing plan.
- `quotaPeriod.quotaUsage`: campaigns and emails sent so far in this period.
- `package.monthlyQuotaAllocation`: the maximum campaigns and emails allowed per quota period. A `campaigns` value of `-1` means unlimited campaigns.

## Tracking settings

Tracking settings control how engagement with the site's emails is measured. They're held in `trackingSettings`, and `trackingSettings.opensTrackingEnabled` determines whether email opens are recorded.

Tracking settings apply to the whole site, so they cover every email sent from it, including email marketing campaigns, automation emails, and triggered emails. Each site has its own tracking settings, so changing them for one site doesn't affect any other site. Sites that have never changed the setting have opens tracking enabled.

Disabling opens tracking doesn't turn off click tracking, and it doesn't delete opens already recorded. Campaign statistics keep reporting opens collected before the change.

## Before you begin

It's important to note the following points before starting to code:

- Account status, premium plan, and quota information are read-only. Use [Get Account Details](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/get-account-details.md) to check account status and quota before publishing campaigns.
- Tracking settings are the only writable part of this API. Change them with [Update Tracking Settings](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/update-tracking-settings.md), which then reports the new values in `accountDetails.trackingSettings`.
- When the account status is not `ACTIVE`, the site owner must resolve the issue in the Wix Email Marketing dashboard. There is no public API for changing account status.
- Quota is tracked per month. Exceeding the email quota prevents additional campaigns from being sent until the quota resets.

## Use cases

- [Check account eligibility before sending a campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/sample-flows.md#check-account-eligibility-before-sending-a-campaign)
- [Disable opens tracking before sending a campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/sample-flows.md#disable-opens-tracking-before-sending-a-campaign)

## Terminology

- **Account status:** Indicates whether the site's email marketing account is active and campaigns can be sent. Possible values: `ACTIVE`, `WARNED`, `SUSPENDED`, `SUSPENDED_AUTOLIFT`, `BANNED`.
- **Quota period:** The current billing cycle, defined by `dateFrom` and `dateTo`, during which the allocated quota applies.
- **Monthly quota allocation:** The maximum number of campaigns and emails the current plan allows per billing period. A value of `-1` means unlimited.
- **Package group:** A set of Wix premium plans that share compatible quota allocations and can be upgraded or downgraded between each other.
- **Tracking settings:** Site-level settings that control how engagement with the site's emails is measured.
- **Opens tracking:** Recording when a recipient opens an email, measured with a tracking pixel embedded in the email.

## SDK Setup
  `@wix/email-marketing`

To use the API, install the `@wix/email-marketing` package.

#### Install the package

Follow the installation instructions for your development environment.

| Development environment | Installation method |
|--|--|
| Wix sites (editor or IDE) | Use the [package manager](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-in-the-editor.md). |
| Wix sites (local IDE) | Run `wix install @wix/email-marketing` using the [Wix CLI](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-with-the-wix-cli.md).|
| Blocks apps | Use the same installation method as Wix sites. |
| CLI and self-hosted apps | Run `npm install @wix/email-marketing` or `yarn add @wix/email-marketing`. |
| Headless sites and apps | Run `npm install @wix/email-marketing` or `yarn add @wix/email-marketing`. |

#### Import the package

To import the package in your code:

```js
import { accountDetails } from '@wix/email-marketing'
```

#### Import types

Types for this API are accessed through the `accountDetails` namespace you already imported above, as `accountDetails.<TypeName>`, using any type name shown in these docs.
  