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
  • 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
  • dns
    • Get dns records
    • Add dns records
    • Update dns records
    • Delete dns records
  1. mailbox

Assign New Mailboxes to Domains

POST
/v2/mailboxes

Add Mailboxes to a Domain#

This endpoint allows you to add mailboxes to a specific domain.

Endpoint#

Request Body#

The request body consists of a key-value structure where the key represents domain ID on which mailboxes are to be assigned, and the value is an array of mailbox objects.
NameTypeDescription
firstNamestringThe first name of the mailbox owner.
lastNamestringThe last name of the mailbox owner.
mailboxUsernamestringThe username for the mailbox.
domainNamestringThe domain to which the mailbox belongs.

Example Request#

{
    "64e71b99-bc07-4b5d-90b6-6abc0120c08c": [
        {
            "firstName": "Jaspreet",
            "lastName": "Singh",
            "mailboxUsername": "jaspreet",
            "domainName": "azhaz.com"
        }
    ]
}

Request

Header Params
x-auth-zapmail
string 
required
Example:
{{x-auth-zapmail}}
Body Params application/json
object {0}
Example
{
  "64e71b99-bc07-4b5d-90b6-6abc0120c08c": [
    {
      "firstName": "Jaspreet",
      "lastName": "Singh",
      "mailboxUsername": "jaspreet",
      "domainName": "azhaz.com"
    }
  ]
}

Request 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 POST 'https://api.zapmail.ai/api/v2/mailboxes' \
--header 'x-auth-zapmail: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "64e71b99-bc07-4b5d-90b6-6abc0120c08c": [
        {
            "firstName": "Jaspreet",
            "lastName": "Singh",
            "mailboxUsername": "jaspreet",
            "domainName": "azhaz.com"
        }
    ]
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{
  "status": 200,
  "message": "Mailboxes will be assigned shortly",
  "data": null
}
Previous
Get Mailbox Details by ID
Next
Update mailbox
Built with