Mailboxes
Manage individual Google Workspace / Microsoft / Azure mailboxes: buy new ones on a domain you already own, list and filter them, update profile info, rotate passwords, and cancel/reactivate.
| Method | Path | Description |
|---|---|---|
POST | /v1/api/mailboxes/list | List/filter mailboxes in the workspace |
GET | /v1/api/mailboxes/show-credentials | Reveal the mailbox’s own Google console password |
POST | /v1/api/mailboxes/smtp-credentials/status | Check whether an SMTP sending credential has been issued |
POST | /v1/api/mailboxes/smtp-credentials/issue | Mint (or rotate) an SMTP sending credential |
GET | /v1/api/mailboxes/details | Get one mailbox’s details |
POST | /v1/api/mailboxes/buy | Buy mailboxes on domain(s) you already control |
POST | /v1/api/mailboxes/status | Check provisioning status |
POST | /v1/api/mailboxes/cancel | Cancel mailboxes |
POST | /v1/api/mailboxes/uncancel | Undo a pending cancellation |
POST | /v1/api/mailboxes/reactivate | Reactivate Microsoft/Azure mailboxes in place (free) |
POST | /v1/api/mailboxes/reactivate-rebuy | Re-purchase & re-provision Microsoft/Azure mailboxes |
POST | /v1/api/mailboxes/resetup | Resetup Google Workspace mailboxes (renewal flow) |
GET | /v1/api/mailboxes/resetup-status | Get the latest resetup job for a domain |
POST | /v1/api/mailboxes/update | Update mailbox first/last name |
POST | /v1/api/mailboxes/add-signature | Set signature on mailbox(es) |
POST | /v1/api/mailboxes/delete-signature | Remove signature |
POST | /v1/api/mailboxes/profile-picture | Update profile picture |
GET | /v1/api/mailboxes/generate-totp | Generate a TOTP code for a mailbox’s 2FA |
POST | /v1/api/mailboxes/username | Change username (local part of the address) |
POST | /v1/api/mailboxes/password | Change password |
GET | /v1/api/mailboxes/availability | Check whether a username is available on a domain |
GET | /v1/api/mailboxes/refresh-tokens | Get OAuth refresh tokens by domain or email |
POST | /v1/api/mailboxes/forwarding/setup | Set up email forwarding (Google) |
POST | /v1/api/mailboxes/forwarding/update | Update email forwarding |
POST | /v1/api/mailboxes/forwarding/remove | Remove email forwarding |
POST | /v1/api/mailboxes/forwarding/jobs | List forwarding job status |
POST | /v1/api/mailboxes/failure-reason | Get why an admin/setup mailbox failed |
POST | /v1/api/mailboxes/client-id-request/initiate | Start a custom OAuth Client ID request |
GET | /v1/api/mailboxes/client-id-request/status/{requestId} | Check a Client ID request |
GET | /v1/api/mailboxes/client-id-requests | List Client ID requests |
For most integrations you won’t buy mailboxes directly here — Orders registers a
domain and buys its mailboxes in one call. Use /mailboxes/buy when the domain is already
registered and verified in your workspace and you just need more mailboxes on it.
List mailboxes
curl -X POST https://api.infrabox.software/v1/api/mailboxes/list \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_UID" \
-H "Content-Type: application/json" \
-d '{ "domain": "yourdomain.com", "page": 1, "limit": 50 }'Filter with keyword, domain, domain_uid, platform (GOOGLE/MICROSOFT/AZURE), status,
or a specific list of uids. Each row includes status, sequencers (what it’s connected to —
see Sequencers), tags, and renewal fields.
Buy mailboxes on an existing domain
curl -X POST https://api.infrabox.software/v1/api/mailboxes/buy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_UID" \
-H "Content-Type: application/json" \
-d '{
"uids": ["<domain_uid>"],
"mailboxes": [
{ "first_name": "Jane", "last_name": "Smith", "username": "jane.smith", "platform": "GOOGLE" }
]
}'username is the local part only — the full address is derived from it plus the domain the
mailbox is bought on.
Reveal console credentials
curl "https://api.infrabox.software/v1/api/mailboxes/show-credentials?uid=<mailbox_uid>" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_UID"Returns the mailbox’s own Google console sign-in password (and TOTP secret, for 2FA). This is not a sending credential — Google requires 2-step verification plus an app password to send over SMTP directly, and this endpoint does not produce that. To actually send mail from the mailbox, use SMTP relay credentials below instead.
Don’t try to authenticate to smtp.gmail.com with the value this endpoint returns — Google will
reject it (534 5.7.9 WebLoginRequired). Sending is done through the Infrabox relay, not
directly against Google.
SMTP relay credentials (for sending)
Every mailbox sends through the Infrabox SMTP relay, not directly against Google — the relay authenticates to Gmail on the mailbox’s behalf via domain-wide delegation, so nothing here ever touches a Google password or 2FA. This is the credential an external sending tool (Instantly/Smartlead/Lemlist/your own code) actually needs.
Check status
curl -X POST https://api.infrabox.software/v1/api/mailboxes/smtp-credentials/status \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_UID" \
-H "Content-Type: application/json" \
-d '{ "uids": ["mb_111", "mb_222"] }'Up to 100 uids per call. Reports password_set per mailbox — never the password itself, which is
bcrypt-hashed at issue time and cannot be returned again by any endpoint.
Issue a credential
curl -X POST https://api.infrabox.software/v1/api/mailboxes/smtp-credentials/issue \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_UID" \
-H "Content-Type: application/json" \
-d '{ "uids": ["mb_111"] }'{
"error": false,
"results": [
{
"uid": "mb_111",
"success": true,
"host": "smtp.infrabox.software",
"port": 2587,
"security": "STARTTLS",
"username": "[email protected]",
"password": "generated-once-password",
"rotated": false,
"warning": "shown once"
}
]
}The password is returned exactly once, in this response — save it immediately. Calling
/issue again for a mailbox that already has one does not reissue it (you’ll get
credential_already_issued back) unless you explicitly pass "rotate": true, since rotating
invalidates the old password instantly with no overlap window. Only pass rotate: true when you
mean to break whatever tool is currently using the old one.
Only active (or scheduled_for_cancellation) GOOGLE mailboxes can receive a credential —
anything else comes back as a per-uid error (not_sendable / unsupported_platform) rather than
failing the whole batch. Rate limited to 20 requests / 5 minutes per team.
Errors
| Status | Meaning |
|---|---|
400 | Invalid body/filters |
401 | Missing/invalid API key |
404 | Mailbox, domain, or workspace not found |
500 | Internal error |