Skip to main content

Case Anomalies

Detector anomalies for a case — field conflicts, divergent shared keys, suspicious value reuse, missing-document-type signals — plus open dangling-reference findings and the matched workflow template.

The anomalies endpoint is the case risk surface. It runs the case's documents through the anomaly detectors and returns what looks wrong: field_conflict (the same key carries divergent values across documents), duplicate_key_divergence, value_reuse_suspicious, and missing_document_type (the matched workflow template expects a document type the case lacks). Each anomaly carries a type, severity, title, description, the document_ids involved, and targets — the (document, field, value) tuples so you can open the offending value directly.

Alongside the detector anomalies, the response includes the case's open findings — the dangling references (a document points at an identifier that resolves to no document in your workspace, signalling a likely missing document) — and the matched workflow template. Anomalies are computed on-read from the case's live field occurrences: no AI call is made and nothing is persisted, so the result always reflects the current documents.

Anomaly detection is bounded: for very large cases (more than ~120 documents) the detectors are skipped and only the open findings are returned, to keep the read fast.
GET/v1/cases/:key/anomalies

Response

Response fields

data[].typestringAnomaly type (field_conflict, duplicate_key_divergence, value_reuse_suspicious, missing_document_type).
data[].severitystringcritical | warning | info.
data[].titlestringShort headline for the anomaly.
data[].descriptionstringHuman-readable explanation.
data[].document_idsstring[]Documents involved in the anomaly.
data[].targetsobject[]Offending (document_id, field, value) tuples for direct navigation.
findingsobject[]Open dangling-reference / missing-document findings (kind, via_field, value, severity).
templateobject | nullMatched workflow template (name, required_types, optional_types) or null.

Two complementary signals also live on the case: anomaly_count on GET /v1/cases/:key (the number of open findings) and GET /v1/cases/:key/completeness (members ÷ members + open findings). Use those for a cheap health number, and this endpoint when you need the detailed anomaly list.