Decision Receipt API
API reference
Complete reference for the Decision Receipt API. Base URL https://decrec.summitcognitive.ai · Version 0.1.0 (spec 1.0) · HTTPS, JSON request/response bodies.
The API evaluates autonomous agent actions for admissibility, producing cryptographically signed receipts that form a tamper-evident audit chain. Each receipt captures evidence, policy evaluation, replay determinism, and an Ed25519 attestation. The canonical, always-current contract is the live OpenAPI spec at /docs (GET /v1/openapi.json).
Authentication
All write endpoints require an API key passed via the X-API-Key header. Keys are scoped to tiers that determine rate limits. Obtain one with a single call:
Request
POST /v1/signup
Content-Type: application/json
{ "email": "you@example.com" }
Response
{
"api_key": "sk_decrec_<uuid>",
"message": "API key issued. Include as X-API-Key header on requests."
}
If the email already has a key, the existing key is returned. New signups start on the free tier. Include the key on every authenticated request as X-API-Key: sk_decrec_<your-key> — it is also accepted as a Bearer token (Authorization: Bearer sk_decrec_<your-key>). Call GET /v1/account to see your tier, rate-limit status, and usage.
Common headers
Every response includes:
| Header | Description |
|---|---|
X-Request-Id | Unique request trace ID — pass your own via request header to correlate. |
X-DecRec-Version | API implementation version (0.1.0). |
X-DecRec-Spec | Spec version (1.0). |
X-RateLimit-Limit | Hourly request limit for your tier. |
X-RateLimit-Remaining | Requests remaining in the current window. |
Core endpoints
Service health check. Add ?deep=true to include database connectivity (Postgres, Neo4j, Redis); returns 503 if any component is unhealthy.
{ "ok": true, "service": "summit-decision-receipt", "version": "0.1.0" }
Uptime, receipt counts (total / accepted / blocked / escalated), memory, and Node version.
The primary endpoint. Submit a claim for admissibility evaluation; returns a signed Decision Receipt. Request body is a ClaimInput:
| Field | Type | Req | Description |
|---|---|---|---|
claim_id | string | Yes | Unique identifier for this claim. |
entity | string | Yes | The entity being evaluated (e.g. repo name). |
claim | string | Yes | Human-readable description of the action. |
expected_replay_match | boolean | No | Whether replay should produce the same result. |
action | object | No | Action metadata (see below). |
decision_rights | array | No | Principal/role/permission assertions. |
sources | array | Yes | Evidence sources (min 1, see below). |
policyConfig | object | No | Per-request policy overrides (see Policy). |
action object
| Field | Type | Req | Description |
|---|---|---|---|
action_type | enum | Yes | code_change, infra_change, access_change, deployment, merge, policy_exception, agent_execution. |
target_system | string | Yes | System being acted on (e.g. github). |
repository · pull_request · commit · branch · environment | string/number | No | Action context. |
risk_scope · affected_controls | string[] | No | Affected risk areas and security controls. |
agent · agent_model · human_operator | string | No | The agent, its model, and the responsible human. |
source object
| Field | Type | Req | Description |
|---|---|---|---|
id | string | Yes | Unique evidence identifier. |
type | enum | Yes | github, ci, agent_trace, code_review, test_result, policy_check, human_approval, model_output, runtime_log, infrastructure, manual. |
uri | string | Yes | URI pointing to the evidence. |
confidence | number | Yes | Confidence score, 0.0–1.0. |
content | string | Yes | Description of the evidence. |
admissibility | object | No | Source-level override (state, reason, required). |
provenance | object | No | Chain of custody (captured_at, snapshot_id, collector, chain_of_custody[]). |
Example response (abridged)
{
"policy": {
"verdict": "ALLOWED",
"reason": "All policy checks passed",
"rules": [
{ "rule": "min_sources", "passed": true, "reason": "2 sources >= 2 required" },
{ "rule": "min_source_types", "passed": true, "reason": "2 types >= 2 required" }
]
},
"replay": { "passed": true, "replay_hash": "sha256:..." },
"receipt": {
"receipt_id": "dr-...",
"admissibility": { "status": "ACCEPTED" },
"subject": { "agent": "claude-code", "repository": "acme-corp/widget-api", "pull_request": 42 },
"evidence": { "inputs_hash": "sha256:...", "source_count": 2, "source_types": ["ci","code_review"] },
"replay": { "deterministic": true, "replay_hash": "sha256:..." },
"policy": { "status": "PASS", "checks": [] },
"attestations": [
{ "signer": "decrec-server", "algorithm": "Ed25519", "signature": "base64...", "timestamp": "2026-05-30T10:35:00.000Z" }
],
"chain": { "sequence": 1, "previous_receipt_hash": null }
}
}
Verdicts: ALLOWED BLOCKED ESCALATED. Admissibility status: ACCEPTED NON_DETERMINISTIC REJECTED. See Policy, verdicts & escalation.
Submit a receipt object as the body. Returns valid (true only when all checks pass), admissibility, verification_depth: "cryptographic", and a checks[] array covering schema presence, hash integrity (recomputed against the ledger), and Ed25519 signature verification. Full walkthrough in Verifying receipts.
Evaluate a claim against a policy without persisting a receipt. Use it to test a policy before enforcing it — see Custom policies.
Returns the server's Ed25519 public key in PEM (text/plain) for offline, independent signature verification.
Totals across all evaluated receipts (accepted / blocked / escalated / non_deterministic), plus the set of agents and repositories seen.
Policy configuration
The optional policyConfig on /v1/evaluate overrides the default policy for that request:
| Field | Type | Description |
|---|---|---|
minSources | integer | Minimum number of evidence sources. |
minSourceTypes | integer | Minimum distinct source types. |
minConfidence | number | Minimum average confidence. |
requireProvenance | boolean | Require provenance on all sources. |
requireReplay | boolean | Require replay determinism. |
requireHumanApproval | boolean | Require a human_approval source type. |
maxRiskScope | integer | Maximum allowed risk-scope size. |
Additional endpoints
Available beyond the core evaluation flow:
| Endpoint | Method | Description |
|---|---|---|
/v1/ledger | GET | Full ledger of all receipt entries. |
/v1/receipts/search | GET | Search by ?q=, ?agent=, ?repo=, ?verdict=. |
/v1/receipts/timeline | GET | Daily receipt counts, optional ?repository=. |
/v1/receipts/compare | GET | Side-by-side comparison by ?ids=id1,id2. |
/v1/receipts/diff | GET | Diff receipts for the same PR across pushes (?repository=&pr=). |
/v1/policies | GET / POST | List built-in and custom policies; create a custom policy. |
/v1/repos | GET | Per-repository summary with acceptance rates. |
/v1/agents | GET | Per-agent receipt breakdown. |
/v1/templates | GET | Claim templates for common scenarios. |
/v1/overview | GET | System-wide overview (receipts, agents, repos, acceptance rate). |
/v1/metrics | GET | Prometheus-compatible metrics. |
/v1/openapi.json | GET | OpenAPI/Swagger spec. |
/v1/webhooks/outbound | POST | Register an outbound webhook for receipt.created events. |
/v1/webhook/github | POST | GitHub webhook receiver — auto-evaluates PRs. See GitHub integration. |
Error handling
Errors return a JSON body with an error field and, where applicable, a code and request_id.
| Status | Meaning |
|---|---|
200 / 201 | Success / resource created. |
400 | Bad request — malformed JSON, missing fields, or schema validation failure. |
401 | Unauthorized — missing/invalid API key or webhook signature. |
404 | Resource not found. |
429 | Rate limit exceeded. |
500 / 503 | Internal error / service unavailable. |
Rate limits
Enforced per API key with a 1-hour sliding window. Current usage is reflected in the X-RateLimit-Limit and X-RateLimit-Remaining response headers.
| Tier | Hourly limit | How to access |
|---|---|---|
free | 100 requests | POST /v1/signup |
pilot | 10,000 requests | Contact brian@summitcognitive.ai or POST /v1/checkout |
enterprise | Unlimited | Contact brian@summitcognitive.ai |
The API allows cross-origin requests (default origin *; methods GET, POST, OPTIONS; preflight returns 204). All endpoints are prefixed /v1; the implementation version is returned in X-DecRec-Version on every response.