quantity and creditsRequired are the number of eligible mailboxes in the selection (one credit per mailbox). A mailbox is eligible when it is ACTIVE, not disabled, on an ACTIVE domain and connected (Zapmail holds a valid refresh token). 0 means none of the selected mailboxes are eligible; check them with POST /ai-insight/eligible-mailboxes.billingCycle ONE_TIME returns the pay-per-analysis lookup key and no credit balance.billingCycle MONTHLY (default) compares the count with the credits returned by GET /ai-insight/available-credits.POST /ai-insight/eligible-mailboxes, POST /ai-insight/generate-mailbox-analysis.curl --location 'https://api.zapmail.ai/api/v3/ai-insight/calculate-pricing' \
--header 'x-auth-zapmail;' \
--header 'Content-Type: application/json' \
--data '{
"tagIds": [
"c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f"
],
"billingCycle": "MONTHLY"
}'{
"status": 200,
"message": "AI Insight pricing calculated successfully",
"data": {
"billingCycle": "MONTHLY",
"quantity": 12,
"creditsRequired": 12,
"availableCredits": 80,
"hasEnoughCredits": true
}
}