Solution

One rule engine, every address on your domain.

Match an exact address, a domain wildcard, a plus-addressed pattern like ticket+*@yourapp.com, or a regex — and route each match to a webhook, a forward address, storage-only, a drop, or a built-in AI agent. It's the same engine behind catch-all, multi-tenant addressing, and inbox agents.

Why it fits

What you get

Four ways to match

An exact address, a domain-wide *@yourapp.com, a plus-addressed pattern like ticket+*@yourapp.com, or a full regex — pick whatever shape your addresses take.

Five actions per match

webhook, forward, store (no delivery, still recorded), drop (discard), or agent (a prompt-driven AI reply) — each route picks one.

Rules, not code

Add, edit, or remove a route from the dashboard or the API — reshaping how mail flows doesn't require touching your webhook handler.

Everything is still stored

Whatever the action, the inbound message is recorded so you can list, inspect, and replay it later — routing doesn't cost you visibility.

How it works

Three steps to live

  1. 1

    Decide the pattern

    Pick an exact address, a domain wildcard, a plus-addressed pattern, or a regex for the slice of mail this rule covers.

  2. 2

    Pick the action

    webhook (with a destination URL), forward (to an address), store, drop, or agent (with a prompt).

  3. 3

    Create the route

    Add it from the dashboard or POST /api/routes — it takes effect on the next matching message, no redeploy.

Show me

create routes

Same createRoute call, four match shapes, five actions — the rules engine behind every solution on this page.

create routes
import { MailKite } from "mailkite";

const mk = new MailKite(process.env.MAILKITE_API_KEY);

// Plus-addressed tickets go to a webhook; everything else on the
// domain falls through to whatever the domain's default route is.
await mk.createRoute({
match: "ticket+*@yourapp.com",
action: "webhook",
destination: "https://yourapp.com/hooks/tickets",
});

// A single address gets forwarded instead of parsed.
await mk.createRoute({
match: "legal@yourapp.com",
action: "forward",
destination: "counsel@lawfirm.com",
});
Install Docs →
In the box

What's included

Questions

What happens to mail that matches no route?

It falls through to the domain's default behavior — typically a catch-all webhook — so nothing silently disappears just because no specific rule matched.

Can I use a plus-addressed pattern like a wildcard?

Yes — ticket+*@yourapp.com (or any prefix before the +) matches the whole family of addresses, which is how multi-tenant and per-signup addressing work without pre-creating each one.

Is regex matching necessary, or is it for edge cases?

Most routes use exact, domain-wildcard, or plus-addressed matching. Regex is there for the address shapes those three don't cover.

Keep reading

Ready to build?

Start free on unlimited domains — no credit card. Or browse the other solutions.