---
title: "Reconciliation Audit"
method: POST
path: "/api/v1/provenance/reconciliation/audit"
tags: ["provenance"]
---

# Reconciliation Audit

`POST /api/v1/provenance/reconciliation/audit`

## Request

- Base URL: `https://api.badgeia.com`
- URL: `https://api.badgeia.com/api/v1/provenance/reconciliation/audit`
- Auth: none declared

BPP-001 W5b — admin-triggered L3 audit lottery.

``require_admin`` is a parameter dependency, so it resolves BEFORE this
body ever runs: a non-admin caller gets 403 regardless of the
reconciliation flag's state. The flag check
(``require_bpp_reconciliation_enabled`` — 404 unless BOTH ``BPP_ENABLED``
and ``BPP_RECONCILIATION_ENABLED`` are true) is the first line of the
body, so an authenticated admin with the flag off gets 404. This exact
ordering mirrors the ``/tasks/secret-suites/*`` precedent
(``app/routers/tasks.py``): 403 (non-admin) takes priority over 404
(flag-off) because the admin dependency always resolves first.

Selects up to ``k`` certifications via the deterministic seeded audit
lottery (``select_audit_candidates`` — Townsend costly-state-
verification, see its docstring) and reconciles each one in turn against
its owner-granted provider usage scope. Certifications with no grant on
file are never selected in the first place. Returns
provider/verdict/delta_pct/cost_scope only — never any key material.

## Request body

- ReconciliationAuditRequest
  - `k` integer

## Response `200`

Successful Response

- ReconciliationAuditResponse
  - `selected_count` integer, required
  - `records` ReconciliationAuditRecord[], required
    - `certification_id` string, uuid, required
    - `provider` string, nullable, required
    - `verdict` string, nullable, required
    - `delta_pct` number, nullable, required
    - `cost_scope` string, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/badgeia/apis/badge.md) · [All operations](https://skmtc.dev/badgeia/apis/badge/llms.txt) · [OpenAPI document](https://skmtc.dev/badgeia/apis/badge/revisions/7e7f7fee8b77?raw)
