API
Mail System

Transactional Mail, Alerts, And Magic-Link Delivery

The mail surface powers outgoing transactional email, operator notifications, contact workflows, and sign-in magic links across the IAI system.

mail.iai.one

Observed live state on March 28, 2026

mail.iai.one currently returns 200 HTML as a Mailcow login surface fronted by nginx on a VPS. It is not a Cloudflare Pages app.

Transactional Email

Receipts, account verification, password reset, and magic-link sign-in messages.

Notification

Human-facing updates triggered by workflows, forms, releases, and support flows.

System Alert

Operational messages for failures, exceptions, and runtime incidents.

Surface Boundary

What The Live Surface Is

  • Mail operations UI and mailbox entry.
  • Delivery infrastructure running outside Pages, fronted by Mailcow and nginx.
  • HTTP send gateway for apps and Workers at https://mail.iai.one/_mail.

Current Guardrails

  • Frontend browsers must not call the mail gateway directly with production keys.
  • Use server-side Workers, Next.js actions/routes, or automation backends to send mail.
  • Per-surface sender and reply-to addresses should match the owning domain mailbox.

Use Cases

Flow Output → Email

Send the result of a workflow to a user, operator, or team inbox.

System Alerts

Notify operators when a runtime step fails, retries, or exceeds policy.

User Notification

Deliver final messages into the user-facing layer without coupling mail logic into the builder itself.

API

POSThttps://mail.iai.one/_mail/emails

Authentication

Use Authorization: Bearer <MAIL_API_KEY>. Keep the key on the server side only.

curl -X POST https://mail.iai.one/_mail/emails \
  -H "Authorization: Bearer <MAIL_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "IAI Flow <flow@iai.one>",
    "to": "operator@example.com",
    "reply_to": "flows@iai.one",
    "subject": "Magic link đăng nhập • Sign-in link",
    "html": "<p>Your secure link is ready.</p>"
  }'
{
  "id": "mail_xxx",
  "accepted": ["operator@example.com"],
  "rejected": []
}

Operational Mailboxes

App/Auth

noreply@iai.one for system auth mail and app@iai.one for reply/support routing.

Docs/Developer

docs@iai.one for content support and developer@iai.one for integration/API help.

Flow Operations

flow@iai.one for outbound Flow mail and flows@iai.one for operations follow-up.

Future Direction

Inbox

First-party delivery surface for viewing platform mail inside the ecosystem.

Thread

Conversation and workflow history grouped into coherent operator context.

AI Mail Routing

Future model-assisted triage, categorization, and escalation behavior.

Boundary with app.iai.one

Mail delivers messages. app.iai.one is the surface where operators review those messages, manage incidents, or trigger follow-up actions.

Current implementation baseline

Use mail.iai.one/_mail for all server-side sending, wire contact/newsletter forms through backend routes, and keep per-surface sender/reply-to mailboxes explicit in each product surface.