API reference

The Katie API.

Every endpoint on console.katieengine.com that a developer uses, with the rules that apply to all of them.

Basics

Base URL
https://console.katieengine.com/api/v1/katie
Authentication
Authorization: Bearer <key>. Create keys in the console under API keys. Each key is a separate workspace. /keys and /registry need no key.
Format
JSON in and out, except document upload (multipart/form-data). Times are ISO 8601 in UTC. Successful responses carry data (and often meta); errors carry an error message.
Idempotency
POST /policies and POST /verifications require an Idempotency-Key header (up to 128 characters). The same key with the same body returns the original result with 200 and Idempotency-Replayed: true; the same key with a different body is refused with 409.
Rate limits
1,000 requests an hour on institutional access, 10,000 on enterprise. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; over the limit you get 429 with Retry-After.
Tracing
Every response carries X-Katie-Correlation-Id. Quote it when you contact us about a request.
Status codes
400 invalid request (the message names the field), 401 missing or unknown key, 403 key without API access, 404 not found (including another key's records), 409 conflict, 413 file too large, 415 unsupported file, 422 a history question Katie cannot answer, 503 temporarily unavailable.

Policies

POST/policies

Adopt a built-in policy with {"builtIn": "katie-document-diligence-v2"} (or katie-document-diligence-permissive-v2, which also accepts a vendor's own declarations), or register your own with these fields:

FieldMeaning
policyKeyStable name. Registering the same key with new fields creates a successor version.
labelHuman-readable name.
materialAuthorityTier1 to 4. Evidence at this tier or better (lower) can decide a claim.
maximumEvidenceAgeDaysEvidence obtained longer ago than this is stale.
minimumIndependentRootsHow many distinct lineageFingerprint values must agree.
acceptAuditedInstitutionalEvidenceWhether your own audited or executed records can corroborate.
requireVerifiedExternalIdentityWhether outside sources must be identified in Katie's source registry.
GET/policies

This key's policies.

Verifications

POST/verifications

Open a claim and evaluate it. Body: policyId, claim and evidence (1 to 50 records), or documentEvidence (ids from a document's evidence) instead of or as well as evidence. Returns the case with its first assessment and receipt; 201 when created.

Claim fieldMeaning
idYour identifier for the claim.
entityid, name and type of what the claim is about.
predicateWhat is being claimed, such as vendor.iso27001.certificate_number.
assertedValue, unitThe value you rely on, and its unit or null.
validAtWhen the value should hold.
decisionContextThe decision this claim supports (up to 500 characters).
Evidence fieldMeaning
idUnique within the case.
source.origininstitutional (your own records), external (an outside source, by https URL) or katie (context only).
source.sourceKey, publisher, urlWhich source, who published it, where.
source.authorityTier1 (most authoritative) to 4.
source.attestationOptional: audited, executed or declared.
value, unitWhat the source says.
retrievedAtWhen you obtained it (not in the future).
validFrom, validToThe period it is valid for; validTo may be null.
lineageFingerprintsha256: plus 64 hex characters naming the original source. Equal fingerprints count as one source.
GET/verifications/{{id}}

One case with its full assessment chain, newest first. Each assessment has a receipt and a signature.

GET/verifications?limit=&amp;cursor=

This key's cases, newest first, up to 100 a page.

History

GET/history?scope=tenant&amp;subject=&amp;predicate=&amp;known_at=&amp;valid_at=

What the evidence Katie held at known_at supported at valid_at, for each of your claims about subject (and predicate, if given). valid_at defaults to known_at. Each record has belief (recomputed under the claim's pinned policy, so it never changes later), recorded (the assessment issued by then) and subsequentChanges. A claim not opened by known_at reads UNRESOLVED; a known_at in the future is refused.

Documents

Submit the documents behind your evidence: SOC 2 reports, ISO/IEC 27001 certificates, certificates of insurance, data processing agreements, subprocessor lists, security questionnaires, and cancellation or withdrawal notices. Katie keeps the exact bytes, renders the text, and reads statements from it. A model proposes the statements and deterministic rules decide which are kept; every kept statement is anchored to its place on the page.

Extraction is not yet switched on at console.katieengine.com. Until it is, documents are kept and hashed but no statements are read from them.

POST/documents

multipart/form-data: file (PDF with a text layer, plain text or CSV, up to 20 MB), documentType (such as soc2_report or certificate_of_insurance), issuer, subjectId (the entity, as your claims name it), and optionally synthetic, submittedBy, and relation (cancels, amends or withdraws) with relatedDocumentId. The same bytes again return the same document.

GET/documents?subjectId=

This key's documents, newest first.

GET/documents/{{id}}

The document, its latest extraction with every statement (kept, context or dropped, with the rule and reason), its lifecycle, what superseded it and the claims citing it.

GET/documents/{{id}}/evidence

The document's kept statements as evidence items. Cite them by id in documentEvidence when opening a claim.

POST/documents/{{id}}/extract

Run extraction again for a retained document. Each run is kept.

POST/documents/{{id}}/erase

Erase a document by destroying its key. Body: {{"reason": "..."}}. Its bytes, text and quoted values become unreadable; its hashes, history and receipts remain, and claims that rested on it are reassessed. This cannot be undone.

Events and webhooks

GET/document-events?after=&amp;types=&amp;limit=

Events in order after a cursor: claim.status_changed, document.expired, document.superseded, document.erased.

To have events delivered, create a subscription with POST /api/v1/subscriptions. Deliveries are signed, sent at least once, and carry the cursor, so a missed window can be replayed from the events endpoint.

Keys, registry and verifying receipts

GET/keys

Katie's receipt-signing public keys (no API key needed). Also at katieengine.com/.well-known/katie-keys.json.

GET/registry

The policy, claim pack, extractor, validator and rule versions this build runs, with their content hashes. The full append-only registry is at katieengine.com/.well-known/katie-registry.json.

Check a saved case with katie-verify.mjs (Node 20 or later, no dependencies):

shell
node katie-verify.mjs case.json                       # uses the published key and registry
node katie-verify.mjs case.json --docs ./documents      # also match cited documents to your files
node katie-verify.mjs case.json --keys keys.json --registry registry.json   # saved copies

It checks each receipt's signature and content hash (naming any edited field), that the chain of receipts has no gaps or forks, each policy against the registry, and with --docs which cited documents your files match. A signature shows what Katie's key vouches for; it does not prove when the receipt was issued.