A
ACCRNOVA REST APIv2.0

ACCRNOVA REST API

Integrate ACCRNOVA's AI governance engine directly into your applications. Run compliance checks, manage sessions, and access audit data programmatically.

Base URL: https://accrnova.app● Live

1. Authentication

All authenticated routes require one of two auth methods:

Bearer Token

Login-based auth. Use the JWT returned by /api/login. Best for operator dashboards.

X-ACCRNOVA-Key Header

API key auth. Pass your axm_... key in the header. Best for server-to-server calls.

bash — API key authentication
curl https://accrnova.app/api/public/check \
  -H "X-Axiom-Key: acn_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Your AI prompt here", "module": "general"}'

2. Quick Start — Compliance Check

The most common integration: run a compliance check before every AI call to gate unsafe prompts automatically.

javascript
const res = await fetch('https://accrnova.app/api/public/check', {
  method: 'POST',
  headers: {
    'X-Axiom-Key': 'axm_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ prompt: 'Draft NDA summary', module: 'legal' }),
});

const { status, riskScore, allowed } = await res.json();
// status: 'completed' | 'frozen' | 'blocked'
// riskScore: 0–100 (higher = riskier)
// allowed: true/false — whether to proceed with the AI call

if (!allowed) {
  // Block the request — ACCRNOVA flagged it
  return { error: 'Prompt blocked by compliance policy' };
}

3. Endpoints

MethodPathAuthDescription
POST/api/public/checkAPI KeyRun compliance check on a prompt
GET/api/sessionsBearerList AI sessions
POST/api/sessionsBearerSubmit a new AI session
GET/api/approvalsBearerList pending approvals
POST/api/approvals/:idBearerReview / resolve an approval
GET/api/auditBearerQuery the audit ledger
GET/api/dashboardBearerPlatform-wide stats

4. Response Schema

The /api/public/check endpoint returns:

json — compliance check response
{
  "sessionId": "sess_abc123",
  "status": "blocked",
  "allowed": false,
  "riskScore": 80,
  "triggeredRules": [
    {
      "name": "Attorney-Client Privilege Guard",
      "severity": "critical",
      "scoreImpact": 40
    }
  ],
  "message": "Session blocked by Circuit Breaker."
}

Status values

completed— Passed all checks
frozen— Pending human review
blocked— Rejected by Circuit Breaker

5. Code Examples

javascript
// 1. Install nothing — pure fetch API
const AXIOM_KEY = 'acn_your_key_here';

// Run a compliance check
async function checkCompliance(prompt, module = 'general') {
  const res = await fetch('https://accrnova.app/api/public/check', {
    method: 'POST',
    headers: {
      'X-Axiom-Key': AXIOM_KEY,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ prompt, module }),
  });

  const result = await res.json();
  // result.allowed → true/false — whether to proceed
  // result.riskScore → 0–100
  // result.status → 'completed' | 'frozen' | 'blocked'

  if (!result.allowed) {
    console.warn('Blocked by ACCRNOVA:', result.message);
    return null;
  }

  return result;
}

// Example usage
const check = await checkCompliance(
  'Draft NDA summary for acquisition',
  'legal'
);

if (check?.allowed) {
  // Proceed with your AI call
}

6. SDK

npm install @axiom-gov/sdkComing Soon

A fully-typed TypeScript/JavaScript SDK with automatic retries, rate-limit handling, and React hooks.

→ Join Early Access
© 2025 ACCRNOVA Governance Inc.hello@accrnova.app