Super Mail Hub API documentation
Everything needed to authenticate, send transactional email, track delivery, handle failures, and verify signed webhooks.
https://your-domain.example/api/v1Authenticate every request with a scoped key
Create a key in Workspace → API & SMTP. Send it as a Bearer token from trusted server-side code. The full secret is shown once and must never be committed, logged, or exposed in frontend JavaScript.
Authorization: Bearer $SUPERMAILHUB_API_KEY/api/v1/sendQueue a transactional email
Validates the workspace, sender mailbox, recipient, plan limits, suppressions, and attachments before accepting the message for asynchronous delivery.
mail.sendJSON request body
mailboxId *uuidAn active mailbox owned by the API key’s workspace.
recipient *emailOne valid recipient address. Suppressed recipients are rejected.
subject *stringMessage subject. Line breaks are not accepted.
bodyText *stringPlain-text message content.
attachmentsAttachment[]Optional. Up to 10 files and 20 MB decoded total; every file is malware-scanned.
attachments[].filenamestringSafe display filename without line breaks.
attachments[].contentTypeMIME typeDefaults to application/octet-stream.
attachments[].contentBase64base64Required attachment bytes encoded with standard Base64.
curl -X POST https://your-domain.example/api/v1/send \
-H "Authorization: Bearer $SUPERMAILHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mailboxId": "YOUR_MAILBOX_ID",
"recipient": "customer@example.com",
"subject": "Your receipt",
"bodyText": "Thanks for your order."
}'Responses
/api/v1/messages/{messageId}Read message delivery status
Returns the current queue-processing state plus provider-reported delivery, bounce, and complaint events for an outbound message in the authenticated workspace.
mail.status.readPath parameters
messageId *uuid · pathThe id returned by POST /api/v1/send.
curl https://your-domain.example/api/v1/messages/MESSAGE_ID \
-H "Authorization: Bearer $SUPERMAILHUB_API_KEY"Responses
Processing state and provider outcome are separate
processingStatus describes Super Mail Hub’s queue. deliveryStatus advances when a receiving provider reports delivery, bounce, or complaint activity.
queuedWaiting for a delivery worker.sendingClaimed by a worker.sentSubmitted successfully over SMTP.retryingSafe to retry because SMTP was not attempted.failedConfirmed failure; no further automatic attempt.delivery_unknownRemote acceptance cannot be proven; no retry to avoid duplicates.deliveredProvider confirmed delivery.soft_bounceTemporary provider rejection.hard_bouncePermanent provider rejection.complaintSpam complaint received.Receive delivery changes without polling
Configure one public HTTPS endpoint in Workspace → API & SMTP. Return a 2xx response promptly. Failed deliveries use exponential backoff and stop after eight attempts.
Webhook-IdStable UUID for deduplicating retries.Webhook-TimestampUnix timestamp used in the signature.Webhook-Signaturev1= followed by the HMAC-SHA256 hex digest.Supported event types
message.queuedAccepted into the delivery queue.message.sendingA worker claimed the message.message.sentSMTP submission completed.message.retryingA safe pre-SMTP failure will be retried.message.deliveredThe receiving provider reported delivery.message.soft_bouncedA temporary provider rejection was reported.message.hard_bouncedA permanent rejection was reported and the recipient is suppressed.message.complainedThe recipient reported the message as spam.message.failedDelivery reached a confirmed terminal failure.message.delivery_unknownSMTP outcome is ambiguous; automatic retry is disabled to prevent duplicates.webhook.testA dashboard-generated endpoint test.Signature verification · Node.js
const signed = timestamp + '.' + rawRequestBody;
const expected = 'v1=' + crypto
.createHmac('sha256', process.env.SUPERMAILHUB_WEBHOOK_SECRET)
.update(signed)
.digest('hex');
const supplied = Buffer.from(signature || '');
const calculated = Buffer.from(expected);
if (supplied.length !== calculated.length ||
!crypto.timingSafeEqual(supplied, calculated)) {
throw new Error('Invalid webhook signature');
}Replay protection: compute the signature from the unmodified raw body, reject stale timestamps, compare signatures in constant time, and deduplicate using Webhook-Id.
Handle failures deliberately
delivery_unknown is intentionally not retried because the remote server may already have accepted the message.All error responses contain an error string. Upgrade responses can also include code: "upgrade_required" and an upgradeUrl.