All endpoints require a Bearer token in the Authorization header.
Authorization: Bearer bp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{ "action": "full_scan", "project_id": "prj_xxx" }
Response:
{
"scan_verdict": "CLEAN | WARNING | BLOCKED",
"contradictions": { "count": 0, "items": [] },
"temporal": { "count": 0, "items": [] }
}
Runs contradiction detection (7 types), temporal governance (6 rules), and adequacy scoring.
{ "action": "compile_for_draw", "project_id": "prj_xxx" }
Response:
{
"compilation": {
"verdict_status": "READY | BLOCKED",
"layers_executed": 6,
"trace": [{ "engine": "pral", "layer": 4, "status": "FIRED" }],
"evidence_available": ["pral_verdict", "adequacy_vector"]
}
}
{ "action": "project", "project_id": "prj_xxx" }
Response:
{
"adequacy": {
"overall": { "score": 83, "grade": "B" },
"vector": {
"lender": { "score": 68, "grade": "C" },
"contractor": { "score": 85, "grade": "B" },
"project": { "score": 90, "grade": "A" },
"cashflow": { "score": 75, "grade": "C" },
"compliance": { "score": 92, "grade": "A" },
"risk": { "score": 88, "grade": "B" }
}
}
}
{ "action": "simulate_draw", "draw_id": "DRW-xxx" }
Response:
{
"recommendation": "APPROVE | DELAY | REVIEW",
"scenarios": [
{ "name": "Approve Now", "capital": {...}, "risk": {...} },
{ "name": "Delay 30 Days", ... },
{ "name": "Reject", ... }
]
}
{ "action": "issue", "project_id": "prj_xxx" }
Response:
{
"certification": {
"id": "CERT-xxx", "grade": "A", "score": 93,
"badge_url": "https://app.buildpaid.ai/api/certification?action=badge&cert=CERT-xxx"
}
}
{ "action": "notarize", "document_type": "LIEN_WAIVER",
"document_id": "WAIV-xxx", "jurisdiction": "NY" }
Response:
{
"notarization_id": "NOT-xxx",
"multi_hash": { "sha256": "...", "sha3": "...", "blake2b": "..." }
}
Governance-gated. Requires: FUNDABLE verdict, 3 signatures, executed waivers, notarization gate passed.
{ "draw_id": "DRW-xxx" }
{ "hash": "9fb7534ad022..." }
Response: { "verdict": "AUTHENTIC" | "TAMPERED" }
11 independent governance rails. Each returns posture (NOMINAL/ELEVATED/CRITICAL), score (0-100), findings, and a provenance hash.
// Scan all 11 rails at once
const response = await fetch('https://app.buildpaid.ai/api/governance-rails?action=scan_all', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const { governance_posture, composite_score, rails, total_findings } = await response.json();
// governance_posture: "NOMINAL" | "ELEVATED" | "CRITICAL"
// rails: [{ name, posture, score, findings }]
// Scan a single rail
const workforce = await fetch('/api/workforce-rail').then(r => r.json());
// { rail: "WORKFORCE", posture: "CRITICAL", score: 52, findings: [...] }
// Available rails:
// /api/system-risk — Kernel integrity, rail health, governance consistency
// /api/workforce-rail — Labor compliance, workforce stability
// /api/schedule-rail — Slippage, pace lag, overdue projects
// /api/safety-governance — OSHA violations, incident tracking
// /api/insurance-rail — COI coverage, expired certificates
// /api/environmental-rail — ESG, emissions, environmental compliance
// /api/procurement-rail — Supply chain, material tracking
// /api/equipment-rail — Utilization, maintenance, failure risk
// /api/weather-rail — Climate risk, thermal scans
// /api/counterparty-rail — Concentration risk, GC exposure
// /api/market-rail — CO velocity, cost escalation
| Profile | Engines | Gates | Governance Rails | Certification Chain |
|---|---|---|---|---|
| Construction | 200+ | 6 | 11 governance rails | Contractor → Architect → Lender |
| Treasury | 7 | 5 | ACH, Wire, SWIFT, RTP | Requestor → Manager → Treasury |
| Insurance | 6 | 4 | ACH, Wire | Adjuster → Claims → Underwriter |
| Government | 7 | 6 | ACH, Wire | PM → Director → Comptroller |
| Supply Chain | 6 | 5 | ACH, SWIFT | Buyer → Trade Finance → Bank |