Zapmail
latest
  • latest
  • v1
  1. mailbox
Zapmail
latest
  • latest
  • v1
  • Zapmail Docs
  • users
    • Retrieve User Details
      GET
  • workspaces
    • Retrieve all workspaces
      GET
    • Create new workspace
      POST
    • Update workspace
      PUT
  • 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
    • Remove Mailboxes Instantly
      POST
  • payments & wallet
    • Add balance to wallet
      POST
    • Get wallet balance
      GET
    • Enable auto recharge
      POST
  • export
    • Export mailboxes
      POST
    • Add third party account details
      POST
    • Update third party account details
      PUT
  • subscriptions
    • Get all subscriptions
      GET
    • Cancel subscription
      POST
    • Upgrade existing subscription
      POST
  • 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.
  • dns
    • Get dns records
    • Add dns records
    • Update dns records
    • Delete dns records
  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. You can also cancel a previously scheduled removal.
1.
mailboxIds
Type: array
Description: IDs of mailboxes that need to be removed on the next renewal. At least 1 mailbox id is required.
2.
remove
Type: boolean
Description: Set to true if you want to remove mailboxes on the next renewal and set to false if you want to cancel removal of mailboxes on the next renewal.

Request

Header Params

Body Params application/json

Example
{
    "mailboxIds": [
        "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"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
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-raw '{
    "mailboxIds": [
        "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"
}'

Responses

🟢200Success
application/json
Body

Example
{
    "message": "Mailbox will be removed on next renewal",
    "data": null
}
🟠400No mailboxes found
🟠400Remove all mailboxes if admin is included
Modified at 2025-10-14 09:22:05
Previous
Update mailbox
Next
Get Authenticator code
Built with