RiskRouter Evidence API
v2: digest-only evidence of any regulated decision, in an RFC 6962 Merkle tree.
v2: digest-only evidence of any regulated decision, in an RFC 6962 Merkle tree.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/riskrouter-eu:riskrouter-eu-evidence-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: RiskRouter Evidence API
version: 1.0.0
summary: Deterministic micro-insurance pricing and a tamper-evident, independently verifiable audit ledger for licensed insurance distributors.
description: 'RiskRouter is infrastructure for insurance distributors: it prices a configuration server-side and, when a distributor key is presented, records the quote in an append-only, SHA-256 hash-chained ledger whose head is signed (ECDSA P-256) so anyone can verify it offline.
Status, stated plainly: this is a validation build. Prices come from a published mock rating matrix, no carrier, bank or payment rail is contacted, and no insurance cover is in force. RiskRouter does not sell insurance and never contacts the policyholder.
Pricing needs no authentication. Recording needs a key; a sandbox key can be taken on the spot from POST /api/v1/sandbox/keys. Keys are sent as `Authorization: Bearer ` or `X-RiskRouter-Key: `. Only the SHA-256 of a key is ever stored.
Human-readable reference: https://riskrouter.eu/docs. Offline verifier: https://github.com/aniljangrabe-dev/riskrouter-verify.'
contact:
name: RiskRouter
url: https://riskrouter.eu/contact
servers:
- url: https://api.riskrouter.eu
tags:
- name: Evidence
description: 'v2: digest-only evidence of any regulated decision, in an RFC 6962 Merkle tree.'
paths:
/api/v2/evidence:
post:
tags:
- Evidence
operationId: recordEvidence
summary: Record the digest of any regulated decision
description: 'The client hashes its own salted record and sends only the SHA-256; the record never reaches RiskRouter. The entry becomes a leaf of an RFC 6962 Merkle tree. A refused write answers 503 with recorded: false, never a success. Specification: https://riskrouter.eu/spec Optionally the client signs its own claim (signer_key_id, claimed_at, client_signature, all three or none): the signature is verified against a registered key before anything is written and then sits inside the leaf (leaf_version 3). See /spec#signed.'
security:
- bearerKey: []
- headerKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- record_digest
- kind
additionalProperties: false
properties:
record_digest:
type: string
pattern: ^[0-9a-f]{64}$
kind:
type: string
pattern: ^[a-z0-9][a-z0-9.-]{0,39}$
signer_key_id:
type: string
pattern: ^[0-9a-f]{16}$
description: 'Optional, with claimed_at and client_signature: the id of a key registered with POST /api/v2/evidence/keys.'
claimed_at:
type: string
pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z$
description: The client's own timestamp, exactly as signed.
client_signature:
type: string
pattern: ^[A-Za-z0-9+/]{86}==$
description: ECDSA P-256 over SHA-256 of riskrouter-evidence-claim|v3|kind|record_digest|signer_key_id|claimed_at, IEEE P1363 r||s, base64.
chain_tag:
type: string
pattern: ^[0-9a-f]{64}$
description: 'Optional, with chain_seq: the completeness chain this record belongs to, 64 hex characters derived from a secret you keep. See /spec#chains.'
chain_seq:
type: integer
minimum: 1
description: 'Optional, with chain_tag: this record''s position in its chain, from 1. Out of turn answers 409 CHAIN_OUT_OF_TURN.'
example:
record_digest: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
kind: ai.decision
responses:
'201':
description: Recorded.
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
recorded:
type: boolean
const: true
entry:
$ref: '#/components/schemas/EvidenceEntry'
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'409':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
/api/v2/evidence/batch:
post:
tags:
- Evidence
operationId: recordEvidenceBatch
summary: Record 1 to 500 digests in one transaction
description: 'The entries are recorded in the order sent, in one transaction, under the same checks and ceilings as a single record; if any entry is refused nothing is written. The body may be up to 131072 bytes. A refused write answers 503 with recorded: false, never a success.'
security:
- bearerKey: []
- headerKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- entries
additionalProperties: false
properties:
entries:
type: array
minItems: 1
maxItems: 500
items:
type: object
required:
- record_digest
- kind
additionalProperties: false
properties:
record_digest:
type: string
pattern: ^[0-9a-f]{64}$
kind:
type: string
pattern: ^[a-z0-9][a-z0-9.-]{0,39}$
signer_key_id:
type: string
pattern: ^[0-9a-f]{16}$
description: 'Optional, with claimed_at and client_signature: the id of a key registered with POST /api/v2/evidence/keys.'
claimed_at:
type: string
pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z$
description: The client's own timestamp, exactly as signed.
client_signature:
type: string
pattern: ^[A-Za-z0-9+/]{86}==$
description: ECDSA P-256 over SHA-256 of riskrouter-evidence-claim|v3|kind|record_digest|signer_key_id|claimed_at, IEEE P1363 r||s, base64.
chain_tag:
type: string
pattern: ^[0-9a-f]{64}$
description: 'Optional, with chain_seq: the completeness chain this record belongs to, 64 hex characters derived from a secret you keep. See /spec#chains.'
chain_seq:
type: integer
minimum: 1
description: 'Optional, with chain_tag: this record''s position in its chain, from 1. Out of turn answers 409 CHAIN_OUT_OF_TURN.'
example:
entries:
- record_digest: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
kind: ai.decision
responses:
'201':
description: Recorded.
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
recorded:
type: boolean
const: true
count:
type: integer
entries:
type: array
items:
$ref: '#/components/schemas/EvidenceEntry'
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'409':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
/api/v2/evidence/key:
get:
tags:
- Evidence
operationId: evidenceKey
summary: Check an API key without recording anything
description: For a connector's test-connection step. Resolves the key exactly as a recording route does and writes nothing.
security:
- bearerKey: []
- headerKey: []
responses:
'200':
description: The key is valid and active.
content:
application/json:
schema:
type: object
required:
- ok
- distributor
- environment
properties:
ok:
type: boolean
const: true
distributor:
type: object
required:
- name
- slug
properties:
name:
type: string
slug:
type: string
environment:
type: string
enum:
- sandbox
- production
'401':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
/api/v2/evidence/head:
get:
tags:
- Evidence
operationId: evidenceHead
summary: The signed tree head of the evidence log
description: 'Save it: every later head must be consistent with it.'
responses:
'200':
description: The signed head.
content:
application/json:
schema:
$ref: '#/components/schemas/SignedEvidenceHead'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'502':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
/api/v2/evidence/proof:
get:
tags:
- Evidence
operationId: evidenceProof
summary: Inclusion proof for one of your entries
description: RFC 9162 audit path from the entry's leaf hash to the root of a tree of tree_size leaves. Take tree_size and root_hash from the same signed head.
security:
- bearerKey: []
- headerKey: []
parameters:
- name: leaf_index
in: query
required: true
schema:
type: integer
minimum: 0
- name: tree_size
in: query
required: false
schema:
type: integer
minimum: 1
responses:
'200':
description: The proof.
content:
application/json:
schema:
type: object
properties:
format:
type: string
const: riskrouter-evidence-proof|v2
entry:
$ref: '#/components/schemas/EvidenceEntry'
tree_size:
type: integer
audit_path:
type: array
items:
type: string
pattern: ^[0-9a-f]{64}$
head:
$ref: '#/components/schemas/EvidenceHead'
signer_public_key:
$ref: '#/components/schemas/SignerPublicKey'
description: 'Present for a v3 leaf: the key to verify client_signature with. The signer should have published the same key.'
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'502':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
/api/v2/evidence/consistency:
get:
tags:
- Evidence
operationId: evidenceConsistency
summary: Proof that an earlier head is a prefix of a later one
description: RFC 9162 consistency proof. Check it against the root in the head you saved for first, never a root the service supplies.
parameters:
- name: first
in: query
required: true
schema:
type: integer
minimum: 1
- name: second
in: query
required: false
schema:
type: integer
minimum: 1
responses:
'200':
description: The proof.
content:
application/json:
schema:
type: object
properties:
format:
type: string
const: riskrouter-evidence-consistency|v2
first:
type: integer
second:
type: integer
proof:
type: array
items:
type: string
pattern: ^[0-9a-f]{64}$
'400':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'502':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
/api/v2/evidence/chain:
get:
tags:
- Evidence
operationId: evidenceChain
summary: What the log holds in one completeness chain, signed
description: 'The length of the chain and, for each position from..to (at most 1,000 a page), the leaf index, the time it was sealed and the record digest, as of the current signed head, signed over riskrouter-evidence-chain|v1|chain_tag|length|tree_size|root_hash|timestamp|from|to|links_digest. Public: the tag is derived from a secret the firm keeps. Names no distributor and holds no record.'
parameters:
- name: chain_tag
in: query
required: true
schema:
type: string
pattern: ^[0-9a-f]{64}$
- name: from
in: query
required: false
schema:
type: integer
minimum: 1
- name: to
in: query
required: false
schema:
type: integer
minimum: 0
responses:
'200':
description: The signed statement.
content:
application/json:
schema:
type: object
properties:
format:
type: string
const: riskrouter-evidence-chain|v1
chain_tag:
type: string
length:
type: integer
from:
type: integer
to:
type: integer
links:
type: array
items:
type: object
properties:
chain_seq:
type: integer
leaf_index:
type: integer
created_at:
type: string
record_digest:
type: string
links_digest:
type: string
head:
$ref: '#/components/schemas/EvidenceHead'
chain_signature:
type: object
chain_signature_unavailable:
type: string
next:
type: string
'400':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'502':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
/api/v2/evidence/statement:
post:
tags:
- Evidence
operationId: registerStatement
summary: Register a SCITT Signed Statement and get its COSE Receipt
description: 'IETF SCITT registration under the riskrouter-scitt-profile|1 policy: a COSE_Sign1 hash envelope (protected 258 = -16, 32-byte payload), ES256, kid = the id of a key registered with POST /api/v2/evidence/keys, CWT claims iss and sub. The log keeps one leaf holding SHA-256 of the statement with its unprotected header emptied. Returns an RFC 9942 COSE Receipt and the Transparent Statement, base64.'
security:
- bearerKey: []
requestBody:
required: true
content:
application/cose:
schema:
type: string
format: binary
responses:
'201':
description: Registered.
content:
application/json:
schema:
type: object
properties:
recorded:
type: boolean
statement_digest:
type: string
receipt:
type:
- string
- 'null'
description: base64 COSE Receipt
transparent_statement:
type: string
description: base64
'400':
description: INVALID_STATEMENT or INVALID_STATEMENT_SIGNATURE. Nothing was recorded.
'401':
description: No key, or a key that does not resolve.
/api/v2/evidence/receipt:
get:
tags:
- Evidence
operationId: evidenceReceipt
summary: An RFC 9942 COSE Receipt of inclusion for an entry you recorded
security:
- bearerKey: []
parameters:
- name: leaf_index
in: query
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: The receipt.
content:
application/scitt-receipt+cose:
schema:
type: string
format: binary
'404':
description: No entry at that index was recorded with this key.
'503':
description: RECEIPT_NOT_SIGNED.
/tlog/evidence-v2/checkpoint:
get:
tags:
- Evidence
operationId: evidenceCheckpoint
summary: The evidence log's head as a C2SP checkpoint
description: 'A signed note (c2sp.org/tlog-checkpoint): origin api.riskrouter.eu/tlog/evidence-v2, tree size, base64 root, signed with the log''s Ed25519 key. The same tree as GET /api/v2/evidence/head. The tree''s hash tiles are served beside it at /tlog/evidence-v2/tile//[.p/] (c2sp.org/tlog-tiles); entry bundles are not published.'
responses:
'200':
description: The checkpoint.
content:
text/plain:
schema:
type: string
'503':
description: 'CHECKPOINT_NOT_SIGNED: no checkpoint key is bound, or it is not the published one.'
/api/v2/evidence/keys:
post:
tags:
- Evidence
operationId: registerSignerKey
summary: Register the public key a distributor signs its claims with
description: Once per key. Idempotent for the same key and distributor (200); a new key answers 201; a key id already registered to another distributor answers 409. Keys are never removed, so leaves signed before a rotation stay verifiable. The key is public and served to anyone by GET; publish it under your own control too.
security:
- bearerKey: []
- headerKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- public_key
additionalProperties: false
properties:
public_key:
$ref: '#/components/schemas/SignerPublicKey'
responses:
'200':
description: Already registered to this distributor.
content:
application/json:
schema:
$ref: '#/components/schemas/SignerKeyRegistration'
'201':
description: Registered.
content:
application/json:
schema:
$ref: '#/components/schemas/SignerKeyRegistration'
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'409':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
get:
tags:
- Evidence
operationId: getSignerKey
summary: A registered signing key, by id
description: 'Public: a public key is public, and a verifier of a v3 leaf needs it. Answers the key and when it was registered, never whose it is.'
parameters:
- name: key_id
in: query
required: true
schema:
type: string
pattern: ^[0-9a-f]{16}$
responses:
'200':
description: The key.
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
key_id:
type: string
public_key:
$ref: '#/components/schemas/SignerPublicKey'
registered_at:
type: string
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
'502':
$ref: '#/components/responses/Error'
'503':
$ref: '#/components/responses/Error'
components:
schemas:
Error:
type: object
properties:
ok:
type: boolean
const: false
error:
type: object
required:
- code
- message
- docs
properties:
code:
type: string
message:
type: string
docs:
type: string
format: uri
description: The row of the error table on https://riskrouter.eu/docs that explains this code and what to do about it.
details: {}
SignerKeyRegistration:
type: object
properties:
ok:
type: boolean
registered:
type: boolean
description: true when this call stored the key; false when it was already yours.
key_id:
type: string
pattern: ^[0-9a-f]{16}$
public_key:
$ref: '#/components/schemas/SignerPublicKey'
registered_at:
type: string
lookup:
type: string
publish:
type: string
sign:
type: string
EvidenceEntry:
type: object
required:
- leaf_index
- created_at
- distributor_id
- kind
- record_digest
- leaf_hash
properties:
leaf_index:
type: integer
minimum: 0
created_at:
type: string
description: UTC, YYYY-MM-DDTHH:MM:SS.ffffffZ, exactly as in the leaf string.
distributor_id:
type: string
format: uuid
kind:
type: string
pattern: ^[a-z0-9][a-z0-9.-]{0,39}$
record_digest:
type: string
pattern: ^[0-9a-f]{64}$
leaf_hash:
type: string
pattern: ^[0-9a-f]{64}$
description: SHA-256(0x00 || leaf string); the leaf string is the v2 or the v3 form according to leaf_version. See /spec.
leaf_version:
type: integer
enum:
- 2
- 3
description: '2: unsigned leaf. 3: the entry also carries signer_key_id, claimed_at and client_signature, the distributor''s own signature over its claim.'
signer_key_id:
type: string
pattern: ^[0-9a-f]{16}$
claimed_at:
type: string
client_signature:
type: string
SignedEvidenceHead:
type: object
properties:
ok:
type: boolean
format:
type: string
const: riskrouter-evidence-head|v2
head:
$ref: '#/components/schemas/EvidenceHead'
signature:
type: object
description: ECDSA P-256 over riskrouter-evidence-head|v2|tree_size|root_hash|timestamp. Absent, with signature_unavailable, when no key is bound.
signature_unavailable:
type: string
SignerPublicKey:
type: object
required:
- kty
- crv
- x
- y
additionalProperties: false
properties:
kty:
const: EC
crv:
const: P-256
x:
type: string
pattern: ^[A-Za-z0-9_-]{43}$
y:
type: string
pattern: ^[A-Za-z0-9_-]{43}$
description: A P-256 public key in JWK form. Its id is the first 16 hex characters of SHA-256 over the JSON array [x, y].
EvidenceHead:
type: object
required:
- tree_size
- root_hash
- timestamp
properties:
tree_size:
type: integer
minimum: 0
root_hash:
type: string
pattern: ^[0-9a-f]{64}$
timestamp:
type: string
format: date-time
responses:
Error:
description: Every error carries the same envelope with a stable code.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
bearerKey:
type: http
scheme: bearer
description: A RiskRouter API key, e.g. rr_sandbox_…
headerKey:
type: apiKey
in: header
name: X-RiskRouter-Key
externalDocs:
description: Integration guide
url: https://riskrouter.eu/integrate