Create a route (match, action, destination).
HTTP: POST /api/routes
| Field | Type | Required | Description |
|---|---|---|---|
match |
string | ✓ | Address pattern: exact, @domain, addr+@domain, or /regex/. |
action |
string | What to do with matching mail. Defaults to webhook. | |
destination |
string | Required for action webhook (URL) or forward (address). | |
agentPrompt |
string | Required for action agent — instructions for the inbox agent. |
any
Object res = mk.createRoute(Map.of("match", "*@app.mailkite.dev", "action", "webhook", "destination", "https://app.com/hooks"));