Skip to main content

Proof API

Base URL: https://cronozen.com/api/v1

Authentication

The Proof API uses API Key authentication, not JWT tokens. Include your key in the Authorization header:

API Key Scopes

Each API key has one or more scopes that control access: A key with proof:read cannot record or approve decisions. A key with proof:write can do everything.
API keys are hashed with SHA-256 before storage. The plaintext key is only shown once at creation time. Treat it like a password.
Proof API keys are separate from JWT tokens used for the rest of the Cronozen platform. A JWT token will not authenticate against the Proof API, and vice versa.

Endpoints

POST /v1/decision-events

Record a new decision event. Scope required: proof:write Request:
Response (201):

Idempotency

Pass an idempotencyKey to prevent duplicate events from retries or network issues. If the same key is sent again, the original event is returned (200) instead of creating a duplicate.
Use idempotency keys for any event that might be retried — settlement webhooks, queue consumers, or cron-triggered recordings.

GET /v1/decision-events

List decision events with filters. Scope required: proof:read Query parameters: Example:
Response (200):

POST /v1/decision-events//approvals

Add human approval and seal the event with SHA-256. Scope required: proof:write Request:
Response (200):
Error — Already sealed (409):
Once an event is sealed, it is immutable. Attempting to approve an already-sealed event returns 409 Conflict. This is by design — sealed events are part of the hash chain and cannot be altered without breaking chain integrity.

GET /v1/evidence/

Retrieve sealed evidence with full hash chain verification data. Scope required: proof:read Response (200):
The evidence.get() endpoint returns the full event payload including input data, AI context, and chain position. Use this for compliance checks and chain integrity verification. Use evidence.export() when you need a portable audit document.

GET /v1/evidence//export

Export a sealed event as a JSON-LD v2 audit document. Scope required: proof:read Response (200):
This document is self-contained and can be stored, shared, or submitted to auditors independently of the Cronozen platform.

Error Reference

All error responses follow this format:

409 Conflict — Sealed Event

The most common non-trivial error. Occurs when calling POST /v1/decision-events/{id}/approvals on an event that has already been approved and sealed. Why this happens:
  • Concurrent approval attempts (two approvers clicking simultaneously)
  • Retry logic re-sending an already-successful approval
  • Webhook handler firing multiple times
How to handle:
Use idempotencyKey on the original decision.record() call to prevent duplicate events upstream.

Proof SDK

TypeScript SDK reference with error handling and integration patterns

Proof Pipeline

How the 4-stage evidence pipeline works under the hood