The lane is gated by a global advisor kill-switch and a per-tenant opt-in (fail-closed: a non-opted-in tenant gets
403). The egress payload is aggregates only — no raw transaction, money, or PII leaves your deployment.Produce suggestions
Build aggregate, privacy-safe history features for a context, ask the AI advisor for candidate rules, and enqueue each surviving candidate in the review queue.
PENDING_REVIEW reviews — producing them creates no rule:
EXACT (strict equality), TOLERANCE (within an amount band), or DATE_LAG (allowing a settlement-date offset). The candidate is config only — it never carries a monetary value or a transaction.
List suggestions
Cursor-paginated list of rule suggestions for a context, optionally filtered by status.
status (PENDING_REVIEW, APPROVED, REJECTED), limit (1–200), and cursor. Reading the queue egresses nothing.
Approve a suggestion
Approving a
PENDING_REVIEW suggestion creates the match rule through the deterministic configuration write path. This is the only path from an AI suggestion to an active match rule, and it runs only on explicit human approval.
Reject a suggestion
Rejecting a
PENDING_REVIEW suggestion discards it — nothing is created. The body is optional.
Lifecycle after approval
Once a suggestion is
APPROVED, its createdRuleId links to a real match rule that participates in match runs exactly like a hand-authored rule. A review is a one-way state machine: a PENDING_REVIEW suggestion transitions to APPROVED or REJECTED once and cannot be re-decided. Attempting to re-decide, or to approve an already-linked review, returns 409. An approved candidate that fails validation returns 422.
Response codes
| Status | Meaning |
|---|---|
200 | Suggestions produced, listed, approved, or rejected |
400 | Invalid status filter or suggestion id |
403 | Tenant not opted into rule suggestions |
404 | Rule suggestion not found |
409 | Invalid state transition / already linked |
422 | Approved suggestion failed validation |
503 | Rule suggestion or advisor not available (author rules manually) |

