Backtests
Availability: turned on per API deployment; until then these endpoints answer 404. Ask Mandate to enable it for your account.
Replay your history through Ward and get a report in the Ward Eval format. Nothing in a backtest reaches your production history, your model's training or shared intelligence.
1. Register the run
curl https://api.mandatelabs.ai/api/v1/ward/backtests -H "X-API-Key: $WARD_API_KEY" -H "Content-Type: application/json" \
-d '{"run": "pilot-2026-11", "friction_target": 0.02, "outcomes_complete": true}'
friction_target is the share of genuine cases you accept stopping; catch is reported at that friction. It is fixed now, before any case is replayed, so it cannot be chosen after seeing the results. outcomes_complete: true means every bad case will have an outcome, so a case with none counts as genuine; otherwise cases with no outcome are left out.
2. Replay, in time order
{"type": "payment", "purpose": "backtest", "backtest_run": "pilot-2026-11", "reference": "txn_2025_000123",
"occurred_at": "2025-08-14T10:22:00Z", "input": {...}}
Card and transfer history is built inside the run, so later cases are judged against the history Ward would have had. Backtests are supported for payment (card and bank transfer), screen and document. A backtest call is billed at half the price.
3. Outcomes, report, close
POST /api/v1/ward/backtests/{run}/outcomes: outcomes of the replayed cases (same shape as outcomes), matched only inside the run.GET /api/v1/ward/backtests/{run}/report: per decision type, cases, bad and genuine, Ward's own decision (catch, friction, genuine declined), catch at your friction target, and catch by label.POST /api/v1/ward/backtests/{run}/close: closes the run and keeps the report.
Runs are deleted 13 months after registration (decisions, references, outcomes and the run's history); the report is kept.