Documentation Index
Fetch the complete documentation index at: https://docs.cronozen.com/llms.txt
Use this file to discover all available pages before exploring further.
Proof API
Base URL:https://cronozen.com/api/v1
Authentication
The Proof API uses API Key authentication, not JWT tokens. Include your key in theAuthorization header:
API Key Scopes
Each API key has one or more scopes that control access:| Scope | Permissions |
|---|---|
proof:read | Query events, get evidence, export reports |
proof:write | Record events, add approvals |
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.
Endpoints
POST /v1/decision-events
Record a new decision event. Scope required:proof:write
Request:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Event type: agent_execution | workflow_step | human_approval | ai_recommendation | automated_action | policy_decision | escalation | custom |
actor | object | Yes | Who/what made the decision |
actor.id | string | Yes | Actor identifier |
actor.type | string | Yes | human | ai_agent | system | service |
actor.name | string | No | Display name |
action | object | Yes | What action was taken |
action.type | string | Yes | Action type identifier |
action.description | string | No | Human-readable description |
action.input | object | No | Action input data (any JSON) |
action.output | object | No | Action output data (any JSON) |
aiContext | object | No | AI involvement details |
aiContext.model | string | No | Model name (e.g., gpt-4, claude-sonnet-4-5-20250514) |
aiContext.provider | string | No | AI provider (e.g., openai, anthropic) |
aiContext.confidence | number | No | Confidence score (0–1) |
aiContext.reasoning | string | No | Decision reasoning |
tags | string[] | No | Filterable tags for categorization |
idempotencyKey | string | No | Prevents duplicate recording (see below) |
Idempotency
Pass anidempotencyKey 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:
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by event type (e.g., agent_execution) |
status | string | recorded | sealed | approved | rejected |
tag | string | Filter by a single tag |
limit | number | Max results, 1–100 (default: 20) |
offset | number | Pagination offset (default: 0) |
POST /v1/decision-events//approvals
Add human approval and seal the event with SHA-256. Scope required:proof:write
Request:
| Field | Type | Required | Description |
|---|---|---|---|
approver | object | Yes | Who approved the decision |
approver.id | string | Yes | Approver identifier |
approver.type | string | Yes | human | system |
approver.name | string | No | Display name |
result | string | Yes | approved | rejected |
reason | string | No | Reason for the decision |
GET /v1/evidence/
Retrieve sealed evidence with full hash chain verification data. Scope required:proof:read
Response (200):
| Field | Description |
|---|---|
chain.hash | SHA-256 hash of this event (content + previousHash + timestamp) |
chain.previousHash | Hash of the preceding event in the chain (null for genesis) |
chain.index | Position in the sequential chain |
chain.domain | Hash chain domain (e.g., proof) |
evidenceLevel | DRAFT → DOCUMENTED → AUDIT_READY |
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):
Error Reference
| Status | Code | Description | Common Cause |
|---|---|---|---|
| 400 | BAD_REQUEST | Malformed request | Invalid JSON body |
| 401 | UNAUTHORIZED | Invalid or missing API key | Wrong key, expired key, missing header |
| 403 | FORBIDDEN | Insufficient scope | proof:read key trying to write |
| 404 | NOT_FOUND | Event not found | Invalid event ID, evidence not yet sealed |
| 409 | CONFLICT | Event already sealed | Attempting to approve a sealed event |
| 422 | VALIDATION_ERROR | Invalid request body | Missing required fields, invalid types |
| 429 | RATE_LIMIT | Too many requests | Retry after a short delay |
| 500 | INTERNAL_ERROR | Internal error | Contact support |
409 Conflict — Sealed Event
The most common non-trivial error. Occurs when callingPOST /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
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