Summit CognitiveDocs

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:

HeaderDescription
X-Request-IdUnique request trace ID — pass your own via request header to correlate.
X-DecRec-VersionAPI implementation version (0.1.0).
X-DecRec-SpecSpec version (1.0).
X-RateLimit-LimitHourly request limit for your tier.
X-RateLimit-RemainingRequests remaining in the current window.

Core endpoints

GET/healthService health · no auth

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" }
GET/v1/statusOperational status · no auth

Uptime, receipt counts (total / accepted / blocked / escalated), memory, and Node version.

POST/v1/evaluateEvaluate a claim · X-API-Key

The primary endpoint. Submit a claim for admissibility evaluation; returns a signed Decision Receipt. Request body is a ClaimInput:

FieldTypeReqDescription
claim_idstringYesUnique identifier for this claim.
entitystringYesThe entity being evaluated (e.g. repo name).
claimstringYesHuman-readable description of the action.
expected_replay_matchbooleanNoWhether replay should produce the same result.
actionobjectNoAction metadata (see below).
decision_rightsarrayNoPrincipal/role/permission assertions.
sourcesarrayYesEvidence sources (min 1, see below).
policyConfigobjectNoPer-request policy overrides (see Policy).

action object

FieldTypeReqDescription
action_typeenumYescode_change, infra_change, access_change, deployment, merge, policy_exception, agent_execution.
target_systemstringYesSystem being acted on (e.g. github).
repository · pull_request · commit · branch · environmentstring/numberNoAction context.
risk_scope · affected_controlsstring[]NoAffected risk areas and security controls.
agent · agent_model · human_operatorstringNoThe agent, its model, and the responsible human.

source object

FieldTypeReqDescription
idstringYesUnique evidence identifier.
typeenumYesgithub, ci, agent_trace, code_review, test_result, policy_check, human_approval, model_output, runtime_log, infrastructure, manual.
uristringYesURI pointing to the evidence.
confidencenumberYesConfidence score, 0.0–1.0.
contentstringYesDescription of the evidence.
admissibilityobjectNoSource-level override (state, reason, required).
provenanceobjectNoChain 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.

POST/v1/verifyVerify a receipt · no auth

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.

POST/v1/simulateDry-run policy · X-API-Key

Evaluate a claim against a policy without persisting a receipt. Use it to test a policy before enforcing it — see Custom policies.

GET/v1/keys/serverServer public key · no auth

Returns the server's Ed25519 public key in PEM (text/plain) for offline, independent signature verification.

GET/v1/ledger/statsAggregate stats · no auth

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:

FieldTypeDescription
minSourcesintegerMinimum number of evidence sources.
minSourceTypesintegerMinimum distinct source types.
minConfidencenumberMinimum average confidence.
requireProvenancebooleanRequire provenance on all sources.
requireReplaybooleanRequire replay determinism.
requireHumanApprovalbooleanRequire a human_approval source type.
maxRiskScopeintegerMaximum allowed risk-scope size.

Additional endpoints

Available beyond the core evaluation flow:

EndpointMethodDescription
/v1/ledgerGETFull ledger of all receipt entries.
/v1/receipts/searchGETSearch by ?q=, ?agent=, ?repo=, ?verdict=.
/v1/receipts/timelineGETDaily receipt counts, optional ?repository=.
/v1/receipts/compareGETSide-by-side comparison by ?ids=id1,id2.
/v1/receipts/diffGETDiff receipts for the same PR across pushes (?repository=&pr=).
/v1/policiesGET / POSTList built-in and custom policies; create a custom policy.
/v1/reposGETPer-repository summary with acceptance rates.
/v1/agentsGETPer-agent receipt breakdown.
/v1/templatesGETClaim templates for common scenarios.
/v1/overviewGETSystem-wide overview (receipts, agents, repos, acceptance rate).
/v1/metricsGETPrometheus-compatible metrics.
/v1/openapi.jsonGETOpenAPI/Swagger spec.
/v1/webhooks/outboundPOSTRegister an outbound webhook for receipt.created events.
/v1/webhook/githubPOSTGitHub 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.

StatusMeaning
200 / 201Success / resource created.
400Bad request — malformed JSON, missing fields, or schema validation failure.
401Unauthorized — missing/invalid API key or webhook signature.
404Resource not found.
429Rate limit exceeded.
500 / 503Internal 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.

TierHourly limitHow to access
free100 requestsPOST /v1/signup
pilot10,000 requestsContact brian@summitcognitive.ai or POST /v1/checkout
enterpriseUnlimitedContact brian@summitcognitive.ai
CORS & versioning

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.