Zapmail
OverviewAPI Reference
OverviewAPI Reference
  1. Mailbox
  • 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
      GET
    • Add Sequencer Details
      POST
    • Get Export Status
      GET
    • Update Sequencer Account Details
      PUT
    • Add Google Client ID To Domain
      POST
    • Connect Third-Party Account
      POST
    • Connect Mailboxes With Custom OAuth
      POST
    • Fetch Workspaces by App
      GET
    • Export Mailboxes
      POST
    • Update Third-Party Account
      PUT
    • Get Export Status
      GET
    • Export Mailboxes
      POST
  • 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 AI Insight Analysis
      • Get Shared AI Insight Analysis
      • List AI Insight Eligible Mailboxes
      • Generate AI Insight Analysis
      • Calculate AI Insight Pricing
      • Purchase AI Insight Plan
      • Purchase AI Insight For Mailboxes
      • Email AI Insight Analysis
      • Share AI Insight Analysis
      • List AI Insight Analyses
      • Upgrade AI Insight Plan
    • 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. Mailbox

Provision Mailboxes

POST
https://api.zapmail.ai/api/v3/mailboxes/provision
Creates mailboxes on domains you already own and buys any missing mailbox slots in the same call. Use it when one request should handle both the purchase and the creation.
Domains are matched by domainName. A domain must be ACTIVE in the workspace and must not be a pre-warmed domain.
Partial success: eligible mailboxes are created and the rest are listed in failed with a reason. The status is 200 in both cases, so check failedCount.
Skipped before any purchase: duplicate usernames inside the request, mailboxes that already exist, and mailboxes beyond the per-domain limit (5 unless raised on the account, counting existing non-expired mailboxes).
Slots bought = eligible mailboxes minus unused capacity left on today's add-on subscription for your base plan, billed at your plan's per-mailbox add-on price. Capacity bought earlier the same day is reused.
Creation is asynchronous. New mailboxes start as IN_PROGRESS; poll Get Mailbox with the returned mailbox.id until status is ACTIVE or FAILED. Re-queue FAILED ones with Retry Failed Mailboxes.
One provisioning request per workspace runs at a time; a concurrent call returns 409.
Charges your wallet. The workspace owner's wallet is charged immediately, before mailboxes are created, for the slots in slotsPurchased. The request fails with 400 if the balance does not cover the cost. The charge is not reversed when an individual mailbox then fails; the unused slots stay on the add-on subscription.
Related: Get Mailbox, List Mailboxes, Retry Failed Mailboxes.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Request processed. Individual failures are reported in data.failed.
Bodyapplication/json

🟠400BadRequest
🟠401Unauthorized
🟠403Forbidden
🟠409Conflict
🟠422UnprocessableEntity
🟠429TooManyRequests
🔴500ServerError
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.zapmail.ai/api/v3/mailboxes/provision' \
--header 'x-auth-zapmail;' \
--header 'x-workspace-key;' \
--header 'Content-Type: application/json' \
--data '{
  "domains": [
    {
      "domainName": "acme.com",
      "mailboxes": [
        {
          "mailboxUsername": "jane",
          "firstName": "Jane",
          "lastName": "Doe"
        },
        {
          "mailboxUsername": "john",
          "firstName": "John",
          "lastName": "Smith"
        }
      ]
    }
  ]
}'
Response Response Example
200 - Success
{
  "status": 200,
  "message": "Mailbox provisioning completed with failures",
  "data": {
    "requested": 2,
    "succeeded": [
      {
        "domainIndex": 0,
        "mailboxIndex": 0,
        "domainName": "acme.com",
        "email": "jane@acme.com",
        "mailbox": {
          "id": "0b6f7a52-3a0e-4a73-9d34-6f0d1a2c9e11",
          "username": "jane",
          "domain": "acme.com"
        }
      }
    ],
    "failed": [
      {
        "domainIndex": 0,
        "mailboxIndex": 1,
        "domainName": "acme.com",
        "mailboxUsername": "john",
        "email": "john@acme.com",
        "reason": "Mailbox already exists"
      }
    ],
    "successCount": 1,
    "failedCount": 1,
    "slotsPurchased": 1
  }
}
Previous
List Mailboxes
Next
Update Mailboxes
Built with