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

Update mailbox

PUT
/v2/mailboxes
This endpoint allows updating mailbox details, including:
First Name
Last Name
Username
Profile Picture
Use this endpoint to make modifications to mailbox information as needed.

mailboxData#

Type: array
Description: An array of mailboxes to be updated. Each mailbox object should include:
mailboxId (string): The unique ID of the mailbox.
firstName (string): The updated first name.
lastName (string): The updated last name.
username (string): The updated username.
profilePicture (string): The URL or path to the new profile picture. Leave empty to keep the current picture.
removeProfilePicture (boolean): Set to true if you want to remove the current profile picture; otherwise, set to false.

Validation Rules#

1.
Payload Structure
mailboxData must be a non-empty array.
Each mailbox object must include all required fields.
2.
username
Must follow valid email username rules:
Cannot start or end with ., _, or -
Cannot contain consecutive ., _, or -
Must be alphanumeric or include valid symbols ., _, -
3.
profilePicture
If profilePicture is provided, it must be a valid URL or path string.
If removeProfilePicture is true, profilePicture can be ignored.
4.
mailboxId (Optional)
If provided, must match one of the mailboxIds in mailboxData.
NOTE: At least one of these mailboxId, domainId, userId is required

Request

Header Params

Body Params application/json

Example
{
  "mailboxData": [
    {
      "userId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "firstName": "Alice",
      "lastName": "Johnson",
      "username": "alice.johnson",
      "removeProfilePicture": true
    },
    {
      "mailboxId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "firstName": "Bob",
      "lastName": "Wilson"
    },
    {
      "domainId": "6ba7b811-9dad-11d1-80b4-00c04fd430c8",
      "firstName": "Charlie",
      "lastName": "Brown",
      "profilePicture": "https://cdn.example.com/charlie.jpg"
    }
  ]
}

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' \
--header 'x-auth-zapmail;' \
--header 'x-workspace-key;' \
--header 'x-service-provider;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "mailboxData": [
    {
      "userId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "firstName": "Alice",
      "lastName": "Johnson",
      "username": "alice.johnson",
      "removeProfilePicture": true
    },
    {
      "mailboxId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "firstName": "Bob",
      "lastName": "Wilson"
    },
    {
      "domainId": "6ba7b811-9dad-11d1-80b4-00c04fd430c8",
      "firstName": "Charlie",
      "lastName": "Brown",
      "profilePicture": "https://cdn.example.com/charlie.jpg"
    }
  ]
}'

Responses

🟢200Success
application/json
Body

Example
{
    "status": 200,
    "message": "User details changes are in progress",
    "data": [
        {
            "mailboxId": "a9a0feda-ca3a-435c-a357-385d36e92f5a",
            "profileUrl": "",
            "failureDetails": []
        }
    ]
}
Modified at 2025-10-14 09:22:06
Previous
Assign New Mailboxes to Domains
Next
Remove mailboxes on next renewal
Built with