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.
| Field | Type | Description |
|---|---|---|
domainrequired | string | An active domain registered with Msgera on your account. |
localPartrequired | string | Part before the @, 1-64 letters, digits, dots, dashes or underscores. |
planIdrequired | string | Mailbox plan id. |
password | string | At least 12 characters. Generated when omitted. |
idempotencyKey | uuid | Reuse 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. The current period is 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 through the mailbox SMTP credentials. Replies go to your mailbox address.
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": "[email protected]",
"subject": "Hello",
"text": "Thanks for your order."
}'Bulk send
Queue up to 500 recipients per request with POST /v1/developer/email/messages/send-bulk.
Mail server settings
Every mailbox response carries the settings mail clients need:
mailServer— IMAP/SMTP hostnamesmtpPortandimapPort— SMTP (587, TLS) and IMAP portswebmailUrl— webmail address for the mailbox
Each account can send up to 30 emails per day by default.
Sync mailbox IMAP with POST /v1/email/mailboxes/:id/sync to import sent and received mail.