Zapmail
latest
  • latest
  • v1
latest
  • latest
  • v1
Sign In
latest
  • latest
  • v1
Root
Root
  1. mailbox
  • Zapmail Docs
  • Webhooks
  • MCP
  • users
    • Retrieve User Details
      GET
  • quick setup
    • Quick Setup
      POST
  • workspaces
    • Retrieve all workspaces
      GET
    • Create new workspace
      POST
    • Update workspace
      PUT
    • List all workspace members
      GET
    • Update user role
      PUT
    • Revoke User Access
      DELETE
    • Send invitiation to join workspace
      POST
    • List all invitations
      GET
    • Revoke invitation
      DELETE
    • Update Domain Renewal Settings
      POST
  • billing
    • Add Billing Details
      POST
    • Update Billing Details
      PUT
  • mailbox
    • Retrieve All Mailboxes
      GET
    • Get Mailbox Details by ID
      GET
    • Assign New Mailboxes to Domains
      POST
    • Update mailbox
      PUT
    • Remove mailboxes on next renewal
      PUT
    • Get Authenticator code
      GET
    • Custom OAuth
      POST
    • schedule mailbox creation
      POST
    • retry creation of failed mailboxes
      PUT
  • payments & wallet
    • Add balance to wallet
    • Get wallet balance
    • Enable auto recharge
    • Purchase add on mailboxes
    • get invoices for subscription
  • export
    • Export mailboxes
    • Add third party account details
    • Update third party account details
    • Get Export Status
    • Fetch Workspaces by App
    • List all third-party accounts
  • subscriptions
    • Get all subscriptions
    • Cancel subscription
    • Upgrade existing subscription
    • Purchase subscription
    • Get Mailboxes in a Subscription
  • domains
    • Retrieve All Domains
    • List Assignable Domains
    • Add DMARC record
    • Add Domain forwarding
    • Get Name servers to connect domain
    • Verify Name Server Propagation
    • Connect Domain with Zapmail
    • Enable email forwarding
    • Remove email forwarding
    • Enable catch all emails
    • Remove catch all emails
    • Check DNS records
    • Remove unused domains
    • Get available domains for registration
    • Get domains purchase payment link
    • Get domain connection requests
    • Remove domain connection requests
    • Connect Domain with Zapmail (New)
    • Add Google Client ID to Domain
    • Get availability of multiple domain names.
    • Retrieve Domain Health Score
    • Retrieve All Domains (With filters)
    • AI Domain Finder
    • Move Domains Across workspace
    • Assign Domain Tag
    • list domain tags
    • Create Domain Tags
    • Remove Domain Forwarding
    • List Domains Eligible for Renewal
    • Get Renewal Price
    • Renew Domains
    • Delete Tag
    • Remove Tags From Domains
    • Update Auto Renew Preference
  • dns
    • Get dns records
    • Add dns records
    • Update dns records
    • Delete dns records
  • High Reputation Domains
    • Get available domains
    • Purchase high reputation domains
  • prewarmed domains
    • Get prewarmed domains
    • purchase prewarmed subscription
    • Assign prewarmed mailboxes
    • Get Available Domains Count
    • Get Prewarm Subscriptions
  • placement test
    • Get subscriptions
    • Get Overall Report
    • Get placement test orders
    • Get report by cart order id
    • Get Eligible Mailboxes for Placement Tests
    • Get Available Placement Test Credits
    • Purchase Placement Test
    • Purchase plan
    • Cancel Subscription
  • dns shield
    • Get eligible domains
    • Get available slots
    • Get subscriptions
    • Get Allocated Domains for Subscription
    • Allocate Domains to DNS Shield
    • Purchase DNS Shield
    • Upgrade DNS Shield LTD Plan
    • Cancel subscription
  • Zapsites
    • Scan A Site
    • Create a New Zapsite
    • Fetch A Zapsite
    • Edit a Zapsite
    • Regenerate a Zapsite
    • Deploy a Zapsite
  • global
    • Global mailbox-domain search
  • zapbox
    • List Connected Accounts
    • Fetch emails
    • get emails from a thread
    • Search emails
    • Send Email
    • Download Attachment
    • Create New Label
    • Delete Label
    • Rename Label
  • Webhooks
    • Get Event Types
    • Get Webhook Endpoints/Destinations
    • Create New Webhook Endpoint/Destination
    • Update a Specific Endpoint
  • Schemas
    • domain with filter
  1. mailbox

Remove mailboxes on next renewal

PUT
/v2/mailboxes/scheduled-removal
This endpoint allows you to schedule the removal of mailboxes on the next renewal, either for entire domains or for specific mailboxes. You can also cancel a previously scheduled removal.
Provide exactly one of domainIds or mailboxIds — not both, and not neither.
1.
domainIds
Type: array
Description: IDs of domains whose mailboxes should be scheduled for removal (full deletion). Every mailbox belonging to the given domain(s) is scheduled for removal. At least 1 domain ID is required. Cannot be combined with mailboxIds.
2.
mailboxIds
Type: array
Description: IDs of individual mailboxes to schedule for removal (partial deletion) — use this to remove a subset of mailboxes within a domain rather than the whole domain. At least 1 mailbox ID is required. Cannot be combined with domainIds. Note: if the selected mailboxes include a domain's admin mailbox, you must include all mailboxes on that domain in the request — an admin mailbox cannot be removed while other mailboxes on the same domain remain.
3.
remove
Type: boolean
Description: Set to true to schedule the specified mailboxes (via domainIds or mailboxIds) for removal on the next renewal, or false to cancel a previously scheduled removal for them.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

🟠400No mailboxes found
🟠400Remove all mailboxes if admin is included
🟠422Unprocessable Entity
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request PUT 'https://api.zapmail.ai/api/v2/mailboxes/scheduled-removal' \
--header 'x-auth-zapmail;' \
--header 'x-workspace-key;' \
--header 'x-service-provider;' \
--header 'Content-Type: application/json' \
--data '{
    "domainIds": [
        "8c710a22-745f-441b-a225-8cd1f8c8f2b1",
        "620b128a-bf3c-4219-a326-404983140fdd",
        "7dff34a9-fbe5-47dd-8864-4aa13fcf85e1",
        "6dc1cd71-a91d-4afc-ab56-48a7e9b22b75",
        "bf4c4a42-b700-4fe9-aa09-57f2dbd8d5c8",
        "e1389587-a124-4a14-a535-026f3f0854c9",
        "53bdd3fa-cb18-47f5-bb70-ec8adb97779d"
    ],
    "remove": true,
    "status": "ACTIVE",
    "contains": "zapmail.com"
}'
Response Response Example
200 - Success
{
    "message": "Mailbox will be removed on next renewal",
    "data": null
}
Modified at 2026-08-25 15:43:33
Previous
Update mailbox
Next
Get Authenticator code
Built with