Skip to Content
📘 Infrabox developer docs — API reference for mailbox & domain infrastructure.
API ReferenceMailboxes

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.

MethodPathDescription
POST/v1/api/mailboxes/listList/filter mailboxes in the workspace
GET/v1/api/mailboxes/show-credentialsReveal the mailbox’s own Google console password
POST/v1/api/mailboxes/smtp-credentials/statusCheck whether an SMTP sending credential has been issued
POST/v1/api/mailboxes/smtp-credentials/issueMint (or rotate) an SMTP sending credential
GET/v1/api/mailboxes/detailsGet one mailbox’s details
POST/v1/api/mailboxes/buyBuy mailboxes on domain(s) you already control
POST/v1/api/mailboxes/statusCheck provisioning status
POST/v1/api/mailboxes/cancelCancel mailboxes
POST/v1/api/mailboxes/uncancelUndo a pending cancellation
POST/v1/api/mailboxes/reactivateReactivate Microsoft/Azure mailboxes in place (free)
POST/v1/api/mailboxes/reactivate-rebuyRe-purchase & re-provision Microsoft/Azure mailboxes
POST/v1/api/mailboxes/resetupResetup Google Workspace mailboxes (renewal flow)
GET/v1/api/mailboxes/resetup-statusGet the latest resetup job for a domain
POST/v1/api/mailboxes/updateUpdate mailbox first/last name
POST/v1/api/mailboxes/add-signatureSet signature on mailbox(es)
POST/v1/api/mailboxes/delete-signatureRemove signature
POST/v1/api/mailboxes/profile-pictureUpdate profile picture
GET/v1/api/mailboxes/generate-totpGenerate a TOTP code for a mailbox’s 2FA
POST/v1/api/mailboxes/usernameChange username (local part of the address)
POST/v1/api/mailboxes/passwordChange password
GET/v1/api/mailboxes/availabilityCheck whether a username is available on a domain
GET/v1/api/mailboxes/refresh-tokensGet OAuth refresh tokens by domain or email
POST/v1/api/mailboxes/forwarding/setupSet up email forwarding (Google)
POST/v1/api/mailboxes/forwarding/updateUpdate email forwarding
POST/v1/api/mailboxes/forwarding/removeRemove email forwarding
POST/v1/api/mailboxes/forwarding/jobsList forwarding job status
POST/v1/api/mailboxes/failure-reasonGet why an admin/setup mailbox failed
POST/v1/api/mailboxes/client-id-request/initiateStart 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-requestsList 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

StatusMeaning
400Invalid body/filters
401Missing/invalid API key
404Mailbox, domain, or workspace not found
500Internal error
Last updated on