Verification model
How Ananke Labs verification works — inputs, outputs, public vs authenticated, and what the result object means.
Verification inputs
There are three ways to verify a document in Ananke Labs:
- By reference — pass the document reference (e.g.,
TRF-XXXXorTCR-XXXX) to the verification endpoint. - By content hash — pass the SHA-256 hash of the original document content. Useful when you have the raw file but not the reference.
- By barcode scan — for Ananke TCode documents, scan the DataMatrix barcode. The payload contains enough data to verify the signature locally and optionally call the API for status.
Verification outcomes
A verification response includes:
| Field | Description |
|---|---|
verdict | valid, revoked, suspended, or not_found |
status | Current lifecycle state of the document |
issuerName | Name of the issuing organization |
issuedAt | Timestamp of original issuance |
documentType | Type of the document |
A valid verdict means the document exists, the signature is correct, and the document has not been revoked or suspended. Any other verdict requires the consumer to treat the document as unverified.
Public vs authenticated
Verification endpoints are designed for public use. They do not require a tenant API key because the intent is that anyone — document recipients, auditors, third parties — can verify a document.
When an API key is passed, it is used for rate-limit identity and audit attribution but is not required for the verification to succeed.
Authenticated operations (issuance, template management, lifecycle actions) always require a valid API key.
Ananke Trust verification
Ananke Trust verification supports two methods:
POST /v1/trust/verify/by-reference— verify by document referencePOST /v1/trust/verify/by-hash— verify by content hash
Both return the same result structure. The verification history endpoint (GET /v1/trust/verify/history) provides an audit trail of all verifications for a tenant.
Ananke TCode verification
Ananke TCode verification supports multiple methods:
GET /v1/tcode/verify/reference/{reference}— verify by stamp referenceGET /v1/tcode/verify/hash/{hash}— verify by content hashPOST /v1/tcode/verify— verify by posting the decoded barcode payloadPOST /v1/tcode/verify/sync— batch sync verification from mobile scanners
Ananke TCode also supports offline verification: the DataMatrix barcode encodes a cryptographic signature that can be verified using the issuer's public key without calling the API.