> 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

## Resource: Sample Flows

## Article: Sample Flows

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

## Article Content:

# Account Details API: Sample Flows

This article presents a possible use case and corresponding sample flow that you can support. It provides a useful starting point as you plan your implementation.

## Check account eligibility before sending a campaign

Before publishing an email marketing campaign, you can verify that the site's account is active and has sufficient email quota remaining. This prevents attempting to publish a campaign that would fail due to an inactive account or an exhausted quota.

To check account eligibility before sending a campaign:

1. Call [Get Account Details](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/account-details/get-account-details.md) to retrieve the current account status and quota.
2. Check the `accountDetails.status` field. If the value is not `ACTIVE`, inform the site owner that they must visit the Wix Email Marketing dashboard to resolve the account issue before campaigns can be sent.
3. Check `accountDetails.quotaPeriod.quotaUsage.emails` against `accountDetails.package.monthlyQuotaAllocation.emails` to determine how many emails remain in the current billing period. If the remaining quota is less than the expected campaign audience size, inform the site owner that the quota is insufficient.
4. If the account is `ACTIVE` and quota is sufficient, proceed to [Publish](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-marketing/campaign/publish-campaign.md) the campaign.