Use the tenant token everywhere
Authenticate once, keep the returned bearer token private, and send it in the Authorization header on every protected request. Principal endpoints use the same route for domains, accounts, groups, lists, roles, API keys, and OAuth clients; the object type controls what is created or filtered.
Base URLhttps://api.mailbux.comHeaderAuthorization: Bearer <access_token>
01Add domainCreate the domain principal and publish DNS records.
02Create accountsAdd individual principals with addresses and quotas.
03Configure accessAssign roles, groups, aliases, forwarders, and app passwords.
04Verify deliveryCheck DKIM, reports, spam training, and diagnostics.
Authentication and Session
Get an access token, discover login metadata, and inspect the tenant-scoped permissions available to the caller.
/api/oauthCreate authorization code
Starts the OAuth authorization-code flow for a tenant administrator or authorized account owner.
Example request
curl -X POST "https://api.mailbux.com/api/oauth" \
-u "[email protected]:your-password" \
-H "Content-Type: application/json" \
-d '{
"type": "code",
"client_id": "mailbux-admin",
"redirect_uri": "https://api.mailbux.com/api/oauth/callback"
}'
/auth/tokenExchange code for bearer token
Exchanges the authorization code for an access token and refresh token used on protected API calls.
Example request
curl -X POST "https://api.mailbux.com/auth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=authorization_code" \
--data-urlencode "code=<auth_code>" \
--data-urlencode "client_id=mailbux-admin"
/api/discover/{email}Discover login provider
Returns sign-in metadata for the email domain, including the provider used by that organization.
/api/accountCurrent account descriptor
Returns the authenticated account, locale, edition, tenant context, and effective permissions.
Tenant and Organization
Tenant administrators work inside their organization boundary. These calls expose profile, quota, and plan context when enabled for the account.
/api/accountTenant-aware account overview
Use the account descriptor as the first call after login to learn what the token can manage.
/api/principal?types=tenantList visible tenants
Returns tenant principals visible to the caller. Most customer tokens only see their own organization.
/api/principal/{tenant_id}Update tenant profile
Updates tenant-owned metadata such as display name, logo, allowed roles, or quota fields when the permission is granted.
/userapi/account-planPlan and usage summary
Returns the Mailbux plan, limits, and account-level usage visible to the signed-in customer.
Domains, DNS, and DKIM
Create domains first, then publish the DNS records returned by Mailbux before adding production mailboxes.
/api/principal?types=domainList domains
Lists domains available in the caller tenant.
/api/principalCreate domain
Creates a domain principal that can later hold mailboxes, aliases, groups, and DKIM signing.
Example request
curl -X POST "https://api.mailbux.com/api/principal" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"type": "domain",
"name": "example.com",
"description": "Primary company domain"
}'
GETPATCHDELETE
Tenant admin/api/principal/{domain}Read, update, or delete domain
Fetch domain details, update allowed fields, or delete a domain after dependent accounts have been removed.
/api/dns/records/{domain}Fetch required DNS records
Returns the MX, SPF, DKIM, DMARC, and verification records to publish for the domain.
/userapi/dkimCreate or view DKIM keys
Generates and returns Mailbux DKIM signing records for a customer domain.
/api/dkimCreate DKIM signature
Creates a DKIM signature object for a domain when advanced DKIM management is enabled.
Accounts, Mailboxes, and Aliases
Mailboxes are individual principals. Aliases and catch-all addresses are additional values on the account email list.
/api/principal?types=individualList email accounts
Lists individual mailboxes inside the tenant.
/api/principalCreate email account
Creates a mailbox with login name, password, addresses, quota, tenant, and roles.
Example request
curl -X POST "https://api.mailbux.com/api/principal" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"type": "individual",
"tenant": "example",
"name": "[email protected]",
"description": "Jane Doe",
"secrets": ["StrongPassword123!"],
"emails": ["[email protected]"],
"quota": 1073741824,
"roles": ["user"]
}'
GETPATCHDELETE
Tenant admin/api/principal/{email}Read, update, or delete account
Fetch mailbox details, change password or quota, suspend access, update membership, or delete the account.
/api/principal/{email}Add or remove alias
Adds an address to the account emails array, or removes it later.
Example request
curl -X PATCH "https://api.mailbux.com/api/principal/[email protected]" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '[{
"action": "addItem",
"field": "emails",
"value": "[email protected]"
}]'
/api/principal/{email}Set domain catch-all
Adds @example.com to an account so unmatched addresses at that domain deliver to the mailbox.
Groups, Shared Inboxes, and Lists
Groups can receive mail and expose a shared inbox to members. Mailing lists distribute mail to internal or external recipients.
/api/principal?types=group,listList groups and lists
Returns collaboration groups and mailing lists visible to the tenant administrator.
/api/principalCreate group
Creates a group principal with addresses, members, optional quota, and shared access behavior.
/api/principalCreate mailing list
Creates a mailing-list principal with internal members and optional external recipients.
/api/principal/{principal_id}Update membership
Adds or removes members, addresses, roles, or list subscriptions from a group or mailing list.
/api/principal/{principal_id}Delete group or list
Removes the group or mailing list principal from the tenant.
Forwarders
Forwarders route incoming messages from a Mailbux address to one or more external destinations.
/api/forwarders?domain={domain}List domain forwarders
Returns forwarders configured for a domain.
/api/forwardersCreate forwarder
Creates a forwarding rule with optional local mailbox copy.
Example request
curl -X POST "https://api.mailbux.com/api/forwarders" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"fromEmail": "[email protected]",
"to": "[email protected],[email protected]",
"keepLocal": true,
"description": "Info desk forwarding"
}'
/api/forwarders/{id}Delete forwarder
Removes a forwarding rule by id.
Roles, API Keys, and OAuth Clients
Grant scoped automation access without sharing a user password.
/api/principal?types=role,apiKey,oauthClientList access principals
Lists roles, API keys, and OAuth clients visible to the tenant administrator.
/api/principalCreate role
Creates a reusable permission bundle that can be assigned to users, groups, or API keys.
/api/principalCreate API key
Creates a tenant-scoped API key for automation. API keys are for management calls, not mailbox login.
/api/principalCreate OAuth client
Registers an OAuth client used by an internal app or trusted integration.
/api/principal/{principal_id}Rotate or revoke access
Updates secrets and permissions or removes the role, API key, or OAuth client.
Account Security
Manage authentication factors, app passwords, suspended access, and encryption-at-rest preferences.
/api/account/authGet own authentication settings
Returns the signed-in account authentication state, including app password and two-factor configuration where available.
/api/account/authUpdate own authentication settings
Adds app passwords, updates password state, or changes two-factor authentication for the signed-in account.
/api/account/cryptoGet encryption settings
Returns the signed-in account encryption-at-rest configuration.
/api/account/cryptoUpdate encryption settings
Updates the signed-in account encryption-at-rest mode when available on the plan.
/api/principal/{email}Suspend or restore account login
Uses permission fields to disable or restore authentication for a tenant mailbox.
Spam Training and Reports
Tenant admins can train filtering and review domain reports where their plan exposes those tools.
/api/spam-filter/train/spamTrain global filter as spam
Uploads a raw message sample and marks it as unwanted mail for training.
/api/spam-filter/train/hamTrain global filter as not spam
Uploads a raw message sample and marks it as legitimate mail for training.
/api/spam-filter/train/{spam|ham}/{account_id}Train account filter
Applies a spam or not-spam training sample to one mailbox account.
/api/reports/dmarcList DMARC reports
Returns incoming DMARC aggregate reports for domains visible to the caller.
/api/reports/tlsList TLS reports
Returns SMTP TLS reporting data for tenant domains.
/api/reports/arfList abuse feedback reports
Returns ARF feedback reports related to tenant traffic.
Deleted Message Recovery
Recover messages that are still inside the account retention window.
/api/store/undelete/{account_id}List restorable messages
Lists deleted messages that can still be restored for the account.
/api/store/undelete/{account_id}Restore messages
Restores selected deleted message records by hash and collection.
Delivery Diagnostics
Read-only troubleshooting helpers for customer-owned domains and outbound delivery checks.
/api/troubleshoot/tokenCreate troubleshooting token
Issues a short-lived token used by delivery diagnostic streams.
/api/troubleshoot/delivery/{recipient}Trace delivery attempt
Runs a delivery diagnostic for a recipient address using a short-lived token.
Intentionally not listed
This page is limited to customer and tenant workflows. The following platform-only operations are not part of the public Mailbux end-user API reference.
- Queue start/stop, reschedule, and message deletion
- Global settings writes and configuration reloads
- Software update, store purge, database, and indexing operations
- Platform-wide telemetry, logs, and live tracing streams