sgeraDocs
Reseller

Email API

Provision, list, and delete mailboxes on your domains, and send email from them.

Mailbox endpoints live under /v1/developer/email and need an API key from an active reseller account. Mailboxes are created on domains you registered with Msgera, and the first month is charged to your wallet before the mailbox is provisioned. Send one-to-one email with POST /v1/developer/email/messages/send.

Create mailbox

Pick a plan id from GET /v1/catalog/email/plans/me, which lists each plan with your priceCents and renewPriceCents. While the domain uses Msgera nameservers, mail DNS (MX, SPF, DKIM) is configured automatically. If provisioning fails, the charge is refunded. A mailbox that was created is final and not refundable (see the Refund Policy).

FieldTypeDescription
domainrequiredstringAn active domain registered with Msgera on your account.
localPartrequiredstringPart before the @, 1-64 letters, digits, dots, dashes or underscores.
planIdrequiredstringMailbox plan id.
idempotencyKeyuuidReuse the same key when retrying so the wallet is never charged twice.
curl -X POST https://api.msgera.io/v1/developer/email/mailboxes \
  -H "X-API-Key: $MSGERA_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.com","localPart":"hello","planId":"plan-5gb"}'

List mailboxes

GET /v1/developer/email/mailboxes returns your mailboxes, newest first. Deleted mailboxes are left out.

curl https://api.msgera.io/v1/developer/email/mailboxes \
  -H "X-API-Key: $MSGERA_KEY"

Delete mailbox

DELETE /v1/developer/email/mailboxes/:id removes the mailbox and its mail immediately. Mailbox charges are not refunded. Unknown ids return 404 MAILBOX_INVALID.

curl -X DELETE https://api.msgera.io/v1/developer/email/mailboxes/9d1e7a3c-2b4f-4e6a-8c0d-5f7b9a1c3e2d \
  -H "X-API-Key: $MSGERA_KEY"

Send email

Requires an active mailbox on your account. Sends are queued and delivered from the mailbox address, and replies arrive in that mailbox. Each mailbox can send up to 100 emails per day (UTC); past that the request returns 429 and nothing is queued.

curl -X POST https://api.msgera.io/v1/developer/email/messages/send \
  -H "X-API-Key: $MSGERA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mailboxId": "mailbox-uuid",
    "to": "customer@example.com",
    "subject": "Hello",
    "text": "Thanks for your order."
  }'

Bulk send

Queue several recipients from one mailbox with POST /v1/developer/email/messages/send-bulk. Every recipient counts toward that mailbox's 100 emails per day, so a request larger than what is left today is refused as a whole.

Webmail and passwords

Every mailbox response includes webmailUrl, where the mailbox owner signs in with the mailbox address and password. Create returns the password, and the mailbox list returns each mailbox's current password (null when none is stored), so treat list responses as secrets. Send from apps and websites through the send endpoints above.

Sent and received mail is imported automatically; call POST /v1/email/mailboxes/:id/sync to import it right away.