Skip to content

Governance API

The governance endpoint is the heart of TheWARDN. Every AI action passes through this endpoint to receive a verdict before execution.

Govern an Action

POST /govern

Submit an action for governance evaluation. Returns a verdict determining whether the action should be executed.

Headers:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body:

FieldTypeRequiredDescription
agent_idstringYesID of the registered agent
action_typestringYesType of action (e.g., deploy_code, data_query, send_email)
target_servicestringYesTarget system or service
environmentstringNoEnvironment (production, staging, development). Default: production
confidenceobjectNoConfidence scores per dimension
reasoningstringNoAgent's reasoning for this action
metadataobjectNoAdditional context (model_id for L6, data_classes, etc.)

Confidence Object:

json
{
  "incident": 0.92,
  "fix": 0.88,
  "containment": 0.95
}

Each dimension is a float between 0.0 and 1.0.

Metadata Object (Optional):

json
{
  "model_id": "gpt-4o",
  "access_channel": "AZURE",
  "data_classes": ["PII", "PHI"],
  "estimated_tokens": 5000
}

Including model_id activates L6 Model Governance pre-checks.

Example Request

bash
curl -X POST https://api.thewardn.ai/govern \
  -H "Authorization: Bearer wdn_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agt_abc123",
    "action_type": "deploy_code",
    "target_service": "production-api",
    "environment": "production",
    "confidence": {
      "incident": 0.95,
      "fix": 0.90,
      "containment": 0.92
    },
    "reasoning": "Deploying hotfix for critical API timeout bug",
    "metadata": {
      "model_id": "claude-sonnet-4-20250514",
      "access_channel": "API"
    }
  }'

Response — CLEARED

json
{
  "execute": true,
  "verdict": "CLEARED",
  "tier": "A",
  "seq": 42,
  "hash": "a3f2b8c9d4e5f6a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
  "l6": {
    "verdict": "CLEARED",
    "model_id": "claude-sonnet-4-20250514",
    "provider": "anthropic",
    "mode": "ENFORCEMENT",
    "violations": [],
    "violations_count": 0,
    "estimated_cost_usd": 0.0045
  }
}

Response — HELD

json
{
  "execute": false,
  "verdict": "HELD",
  "tier": "B",
  "seq": 43,
  "hash": "b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4",
  "escrow_id": "esc_xyz789",
  "timeout_at": "2026-04-10T20:24:03Z",
  "message": "Confidence below floor: fix=0.70 < 0.75"
}

Response — BLOCKED

json
{
  "execute": false,
  "verdict": "BLOCKED",
  "tier": "X",
  "seq": 44,
  "hash": "c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5",
  "reason": "SGP_VIOLATION",
  "rule_violated": "NO_PRODUCTION_WITHOUT_REVIEW",
  "message": "Action blocked by Sentinel Governance Principle"
}

Response Fields

FieldTypeDescription
executebooleanWhether the agent should execute the action
verdictstringCLEARED, HELD, or BLOCKED
tierstringA, B, C, or X
seqintegerMonotonic sequence number for this audit record
hashstringSHA-256 hash of the sealed audit record
escrow_idstringOnly present if HELD — ID for escrow management
timeout_atstringOnly present if HELD — when the escrow expires
reasonstringOnly present if BLOCKED — reason code
rule_violatedstringOnly present if X-tier BLOCKED — specific SGP rule
messagestringHuman-readable explanation
l6objectOnly present if L6 model governance evaluated
governance_modestringOnly present if not ENFORCED
original_verdictstringOnly present in AUDIT_ONLY mode — what verdict would have been

Governance Modes

GET /governance-mode

Get the current governance mode for your tenant.

json
{
  "mode": "ENFORCED",
  "expires_at": null
}

PUT /governance-mode

Change governance mode. Requires ARCHITECT role.

json
{
  "mode": "AUDIT_ONLY",
  "duration_hours": 24
}
ModeBehavior
ENFORCEDAll verdicts enforced (default)
AUDIT_ONLYVerdicts logged but all actions CLEARED
DISABLEDNo evaluation, immediate pass-through

WARNING

DISABLED mode should only be used in emergencies. All actions bypass governance with no audit trail.

Dashboard

GET /dashboard

Get governance statistics for your tenant.

json
{
  "total_governed": 12547,
  "total_cleared": 11892,
  "total_held": 498,
  "total_blocked": 157,
  "active_agents": 12,
  "active_policies": 8,
  "governance_mode": "ENFORCED",
  "monthly_used": 3421,
  "monthly_limit": 50000
}

AI Governance for Every Organization