MultiMail provides the email backend your Superblocks automations need — with delivery policy enforcement, approval queues, and audit trails built in.
Superblocks lets engineering teams build internal tools, approval dashboards, and operational automations on top of their existing data sources. When those automations need to send, receive, or route email — especially email triggered by AI agents — you need a backend that enforces delivery policy, not just one that calls an SMTP relay.
MultiMail exposes a REST API designed for programmatic agents. Every call to `send_email`, `reply_email`, or `decide_email` is subject to the oversight mode you configure per mailbox. In a Superblocks workflow, that means you can gate agent-drafted emails through a human approval step before delivery, or run fully autonomously once you've validated the agent's behavior.
The typical pattern is a Superblocks workflow that invokes MultiMail's REST API via its built-in HTTP integration. The workflow handles the business logic — routing, escalation, record updates — while MultiMail handles the email primitives and enforces the delivery contract.
MultiMail's `gated_send` and `gated_all` oversight modes hold outbound email in a pending queue until a human approves via `decide_email`. Your Superblocks approval UI can drive that decision without needing to rebuild delivery gating logic.
Inbound email to any `@multimail.dev` or custom-domain mailbox fires a webhook your Superblocks workflow can consume. Route support tickets, parse structured replies, or trigger downstream automations based on email content — without polling.
Every `send_email`, `reply_email`, and `decide_email` call is logged with the mailbox, agent identity, and approval status. Enterprises subject to SOC 2 or internal change-management policies get a full record without extra instrumentation.
Use `create_mailbox` to provision a dedicated mailbox per Superblocks application, customer segment, or environment. Inbound and outbound traffic stays isolated, and quota limits are enforced at the mailbox level.
MultiMail's oversight, identity, and authorization logic is verified in Lean 4. For enterprise workflows handling sensitive operational email, that means the delivery gating behavior is provably correct — not just tested.
"cm">// Superblocks API step — JavaScript (Fetch)
const response = await fetch('https://api.multimail.dev/send_email', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + Env.MULTIMAIL_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
from: '[email protected]',
to: ['[email protected]'],
subject: 'PO #{{purchase_order_id}} — approval required',
body: {
text: `Hi,\n\nWe are ready to approve purchase order #${inputs.purchase_order_id}.\nAmount: $${inputs.amount}\n\nPlease confirm receipt.`,
},
oversight_mode: 'gated_send',
metadata: {
workflow_run_id: inputs.run_id,
initiated_by: 'procurement-automation',
},
}),
});
const result = await response.json();
"cm">// result.message_id — use this to poll or decide
return result;Call MultiMail's `send_email` endpoint from a Superblocks API step. Using `gated_send` oversight mode, the email is held for human approval before delivery.
"cm">// Superblocks button onClick handler
const decision = await fetch('https://api.multimail.dev/decide_email', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + Env.MULTIMAIL_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
message_id: table1.selectedRow.data.message_id,
decision: 'approve', "cm">// or 'reject'
reviewer_note: textInput1.value || undefined,
}),
});
const result = await decision.json();
if (result.status === 'sent') {
showNotification({ message: 'Email delivered.', type: 'success' });
} else {
showNotification({ message: 'Rejected and cancelled.', type: 'info' });
}
await pendingEmailsQuery.trigger(); "cm">// refresh the queue tableAfter an agent queues an email with `gated_send`, a Superblocks button component can call `decide_email` to approve or reject delivery without leaving the internal tool.
"cm">// Superblocks Query — runs on page load
const response = await fetch(
'https:"cm">//api.multimail.dev/[email protected]&unread=true&limit=50',
{
headers: {
'Authorization': 'Bearer ' + Env.MULTIMAIL_API_KEY,
},
}
);
const { emails } = await response.json();
"cm">// Return shaped for a Superblocks table
return emails.map(e => ({
id: e.message_id,
from: e.from,
subject: e.subject,
received_at: new Date(e.received_at).toLocaleString(),
has_attachment: e.attachments?.length > 0,
}));Pull unread emails from a MultiMail mailbox to populate a Superblocks table widget. Use this as the data source for a triage or escalation dashboard.
"cm">// Superblocks workflow step — create mailbox on tenant creation
const response = await fetch('https://api.multimail.dev/create_mailbox', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + Env.MULTIMAIL_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: `tenant-${inputs.tenant_slug}`,
domain: 'multimail.dev',
oversight_mode: 'gated_send',
webhook_url: `https:"cm">//superblocks.acme.com/api/webhooks/email?tenant=${inputs.tenant_id}`,
}),
});
const mailbox = await response.json();
"cm">// mailbox.address => "[email protected]"
await db.updateTenant({ id: inputs.tenant_id, email_address: mailbox.address });
return mailbox;Call `create_mailbox` from a Superblocks onboarding workflow to give each customer a dedicated email address automatically.
"cm">// Superblocks Query — fetch the pending queue
const listRes = await fetch(
'https://api.multimail.dev/[email protected]',
{ headers: { 'Authorization': 'Bearer ' + Env.MULTIMAIL_API_KEY } }
);
const { pending } = await listRes.json();
"cm">// Superblocks button — cancel a selected item
async function cancelSelected() {
const cancelRes = await fetch('https://api.multimail.dev/cancel_message', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + Env.MULTIMAIL_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({ message_id: pendingTable.selectedRow.data.id }),
});
const result = await cancelRes.json();
await pendingQuery.trigger();
return result;
}Use `list_pending` and `cancel_message` together to give Superblocks operators a pre-send review queue with the ability to pull back any queued email.
Sign up at multimail.dev, choose a plan (Starter is free), and generate a live API key from the dashboard. Copy the `mm_live_...` key — you will store it as a Superblocks environment variable.
"cm"># Verify the key works
curl -s https://api.multimail.dev/check_inbox \
-H "Authorization: Bearer $MULTIMAIL_API_KEY" \
-G --data-urlencode "[email protected]"In your Superblocks organization settings, add `MULTIMAIL_API_KEY` as a secret environment variable. Reference it in API steps as `Env.MULTIMAIL_API_KEY`. Never hardcode the key in a workflow definition.
Call `create_mailbox` once to provision the address your workflow will send from and receive at. Set `oversight_mode` to `gated_send` while you validate behavior, then switch to `monitored` or `autonomous` once you're confident.
curl -s -X POST https://api.multimail.dev/create_mailbox \
-H "Authorization: Bearer $MULTIMAIL_API_KEY" \
-H "Content-Type: application/json" \
-d &"cm">#039;{"name":"ops-agent","domain":"multimail.dev","oversight_mode":"gated_send"}'In the Superblocks workflow editor, add a REST API step pointing to `https://api.multimail.dev/send_email`. Set the Authorization header to `Bearer {{Env.MULTIMAIL_API_KEY}}` and build the request body from your workflow's input variables.
If you are using `gated_send`, create a Superblocks app with a table bound to a `list_pending` query and Approve / Reject buttons that call `decide_email`. This is your human-in-the-loop review interface for agent-drafted email.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.