Zapmail
OverviewAPI Reference
OverviewAPI Reference
  1. AI Insight
  • Domains
    • DNS
      • Get DNS Records
      • Add DNS Records
      • Check DNS Records
      • Add DNS Records to Multiple Domains
      • Update DNS Record
      • Delete DNS Record
    • Register
      • Search Available Domains
      • Buy Domains
      • Check Availability of Multiple Domains
      • Find Domains With AI
    • Connect
      • List Domain Connection Requests
      • Connect Domains
      • Get Nameservers to Connect a Domain
      • Verify Nameservers to Connect a Domain
      • Add Google Client ID to Domains
      • Remove Domain Connection Requests
    • Tag
      • List Domain Tags
      • Assign Tags to Domains
      • Create Domain Tags
      • Remove Tags from Domains
      • Delete Domain Tag
      • Update Domain Settings
    • Renewals
      • Search Domains Due for Renewal
      • Get Domain Renewal Prices
      • Renew Domains
      • Update Domain Auto-Renew
      • List Domains Due for Renewal
    • List Assignable Domains
      GET
    • Get Domain Health Score
      GET
    • Search Mailboxes and Domains
      GET
    • List Domains
      POST
    • Move Domains to Another Workspace
      POST
    • Remove Connected Domains
      DELETE
  • Mailbox
    • Get Authenticator Code
      GET
    • Get Mailbox
      GET
    • List Mailboxes
      POST
    • Provision Mailboxes
      POST
    • Update Mailboxes
      PUT
    • Schedule Mailbox Removal
      PUT
    • Retry Failed Mailboxes
      PUT
  • Export
    • List Third-Party Workspaces
    • Add Sequencer Details
    • Get Export Status
    • Update Sequencer Account Details
    • Add Google Client ID To Domain
    • Connect Third-Party Account
    • Connect Mailboxes With Custom OAuth
    • Fetch Workspaces by App
    • Export Mailboxes
    • Update Third-Party Account
    • Get Export Status
    • Export Mailboxes
  • Quick Setup
    • List Quick Setup Entries
    • Start Quick Setup
  • Pre-Warmed
    • List Pre-Warmed Domains
    • Count Pre-Warmed Domains
    • List Pre-Warmed Subscriptions
    • Assign Pre-Warmed Domains
    • Purchase Pre-Warmed Plan
  • Zapbox
    • List Zapbox Connected Accounts
    • List Zapbox Threads
    • Get Zapbox Thread Messages
    • Search Zapbox Emails
    • Send Zapbox Email
    • Apply Zapbox Email Action
    • Download Zapbox Attachment
    • Create Zapbox Label
    • Delete Zapbox Label
    • Rename Zapbox Label
  • User
    • Get Current User
  • Billing Details
    • Add Billing Details
    • Update Billing Details
  • Payments & Wallet
    • Get Wallet Balance
    • Add Wallet Balance
    • Enable or Disable Auto Recharge
    • Buy Add-On Mailboxes
    • Get Subscription Invoice URL
  • Subscriptions and Workspaces
    • List Workspace Members
    • List Workspace Invitations
    • List Workspaces
    • List Subscriptions
    • Create Workspace
    • Send Workspace Invitation
    • Cancel Subscription
    • List Subscription Mailboxes
    • Update Member Role
    • Update Workspace
    • Revoke Workspace Access
  • High Reputation Domains
    • List Aged Domains
    • Purchase Aged Domains
  • Deliverability
    • ZapShield
      • List ZapShield Subscriptions
      • List ZapShield Eligible Domains
      • List ZapShield Allocated Domains
      • Get ZapShield Available Slots
      • Cancel ZapShield Subscription
      • Purchase ZapShield
      • Upgrade ZapShield Plan
      • Allocate Domains to ZapShield
    • Deliverability Test
      • Get Deliverability Test Overall Report
      • List Deliverability Test Orders
      • Get Deliverability Test Report
      • List Deliverability Test Subscriptions
      • Get Deliverability Test Available Slots
      • List Deliverability Test Eligible Mailboxes
      • Purchase Deliverability Test
      • Generate Deliverability Test Spintax
      • Purchase Deliverability Test Plan
      • Cancel Deliverability Test Subscription
    • AI Insight
      • Get AI Insight Credits
        GET
      • Get AI Insight Analysis
        GET
      • Get Shared AI Insight Analysis
        GET
      • List AI Insight Eligible Mailboxes
        POST
      • Generate AI Insight Analysis
        POST
      • Calculate AI Insight Pricing
        POST
      • Purchase AI Insight Plan
        POST
      • Purchase AI Insight For Mailboxes
        POST
      • Email AI Insight Analysis
        POST
      • Share AI Insight Analysis
        POST
      • List AI Insight Analyses
        POST
      • Upgrade AI Insight Plan
        POST
    • Zap Care
      • List Zap Care Allocated Domains
      • Get Zap Care Available Slots
      • List Zap Care Subscriptions
      • List Zap Care Eligible Domains
      • Cancel Zap Care Subscription
      • Allocate Domains to Zap Care
      • Purchase Zap Care
  • Webhooks
    • List Webhook Event Types
    • List Webhook Endpoints
    • List Webhook Deliveries
    • Get Webhook Endpoint
    • Create Webhook Endpoint
    • Resend Webhook Delivery
    • Send Test Webhook Event
    • Update Webhook Endpoint
    • Delete Webhook Endpoint
  • Zap Sites
    • Get Zap Site
    • Create Zap Site
    • Regenerate Zap Site
    • Deploy Zap Site
    • Scan Zap Site Destination
    • Update Zap Site
  • Zapwarm
    • List mailboxes eligible for warmup
    • Get the Zapwarm quote for selected mailboxes
    • Start Zapwarm on selected mailboxes
    • Turn off Zapwarm on selected mailboxes
    • Edit Zapwarm settings
    • Get zapwarm score
  • ZapPulse
    • Get ZapPulse Overview
    • Get ZapPulse Insights
    • List ZapPulse Mailboxes
    • Get ZapPulse Mailbox Report
    • Create ZapPulse Report Share Link
  1. AI Insight

Generate AI Insight Analysis

POST
https://api.zapmail.ai/api/v3/ai-insight/generate-mailbox-analysis
Starts an AI Insight analysis (the last 15 days of data) for the selected mailboxes. Pass mailboxIds, or let tagIds, contains and filters pick the mailboxes.
With an active AI Insight plan, one credit per mailbox is deducted and one analysis job per mailbox is queued. The response lists the cart orders and mailboxes that were queued. Fetch results with POST /ai-insight/mailbox-analysis and poll until status is SUCCESS or FAILED.
Without an active plan, nothing is queued. The call creates a one-time invoice for the selected mailboxes and returns a payment link (checkoutUrl).
Only mailboxes that belong to you, sit in the active workspace and are connected (Zapmail holds a valid OAuth refresh token for them) are analysed. Others are skipped silently. If none qualify, the call fails with HTTP 404 and the message No mailboxes found with valid refresh tokens or not belong to you.
To test, first call POST /ai-insight/eligible-mailboxes and pass the IDs it returns. A mailbox that is still being set up, disconnected, or in another workspace will not qualify.
If the plan has fewer credits than mailboxes, the call fails with a 500 error and no credits are deducted.
Charges your wallet. On the no-plan path the account owner is invoiced for one one-time analysis per selected mailbox; the invoice is paid from wallet balance when it covers the cost, otherwise checkoutUrl is the link for the remainder. With a plan, credits are consumed instead of money.
Related: GET /ai-insight/available-credits, POST /ai-insight/calculate-pricing, POST /ai-insight/purchase-plan.

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

🟠400BadRequest
🟠401Unauthorized
🟠403Forbidden
🟠404NotFound
🟠422UnprocessableEntity
🟠429TooManyRequests
🔴500ServerError
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.zapmail.ai/api/v3/ai-insight/generate-mailbox-analysis' \
--header 'x-auth-zapmail;' \
--header 'Content-Type: application/json' \
--data '{
  "mailboxIds": [
    "3f6c1a52-8d4e-4b7a-9c21-5e0d7a1b2c33",
    "7a9d2e41-1b3c-4f58-a6d0-2c8e4b9f1a07"
  ]
}'
Response Response Example
200 - Queued with plan
{
  "status": 200,
  "message": "Mailboxes analysis started successfully",
  "data": {
    "cartOrderId": "d3e4f5a6-7b8c-4d9e-a0f1-2b3c4d5e6f70",
    "cartOrderIds": [
      "d3e4f5a6-7b8c-4d9e-a0f1-2b3c4d5e6f70"
    ],
    "mailboxIds": [
      "3f6c1a52-8d4e-4b7a-9c21-5e0d7a1b2c33",
      "7a9d2e41-1b3c-4f58-a6d0-2c8e4b9f1a07"
    ],
    "requestedMailboxCount": 2,
    "processedMailboxCount": 2
  }
}
Previous
List AI Insight Eligible Mailboxes
Next
Calculate AI Insight Pricing
Built with