Skip to main content

Human Reviews

Raise and resolve Human Reviews on app runs: the workspace inbox, resolver policy by kind, the interview endpoint, rule candidates, and precedent memory.

A Human Review is a structured request for human input raised by an app: run context, a question, a JSON Schema input_contract the answer must satisfy, and a feedback section. Reviews are raised by the system (threshold breaches, fallback hold), by rules whose response is *review*, by the Assisted drafting agent (with a proposal attached), by external agents, or by humans attaching judgment to a run after the fact. The exception queue (GET /v1/apps/:id/exceptions) is simply the system-raised subset. Review is a *response*, never an outcome status — resolving one is what unblocks or amends the run.

Raise with POST /v1/apps/:id/reviews (operate tier, answers 201): a kind, the question (max 4000 chars), the input_contract, optional run_id, free-form context, and optional team_id routing. List per app with GET /v1/apps/:id/reviews or across the workspace with the inbox GET /v1/reviews, both filterable by status (open, assigned, resolved, expired, cancelled), kind, and — on the inbox — app_id and assignee_user_id. Raising fires the app.review.raised webhook; resolving fires app.review.resolved.

Resolver policy depends on the kind. approval is human-only with separation of duties (raiser ≠ resolver). resolution and judgment accept a human, or a machine caller holding an operate grant on the review's app (zero-grant keys fall back to the legacy write scope). data_request accepts any authorized actor. The resolver's identity is recorded in the journal and the sealed record identically for every actor type.

POST/v1/reviews/:reviewId/resolve

Body

values*objectThe resolution, validating against the review's input_contract (422 on violation).
feedbackobject{ proposal_verdict: correct | incorrect | partial, correction, generalize } — the half that teaches the app. generalize: true queues a rule candidate.

curl — resolve with generalizable feedback

curl -s -X POST https://api.talonic.com/v1/reviews/$REVIEW_ID/resolve \
  -H "Authorization: Bearer tlnc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "values": { "decision": "approve", "note": "Supplier confirmed the corrected quantity by email." },
    "feedback": {
      "proposal_verdict": "incorrect",
      "correction": "Treat a missing quantity as reviewable, not a hard hold.",
      "generalize": true
    }
  }'

Response (200) — resolved review

{
  "id": "f763bd44-f428-4db0-a6a0-a441efe67c44",
  "app_id": "80afca3e-c66c-4f07-abbf-78913ee80dff",
  "run_id": "66c905a7-d67a-45be-a161-de11695ff564",
  "kind": "judgment",
  "status": "resolved",
  "question": "Quantity is missing on this invoice. Should it be approved anyway?",
  "context": { "invoice": "INV-2026-0847" },
  "input_contract": {
    "type": "object",
    "required": ["decision"],
    "properties": { "decision": { "enum": ["approve", "hold"] }, "note": { "type": "string" } }
  },
  "raised_by": { "id": "22e9f8d8-ae2b-47f9-a1fc-d29cf8440271", "type": "api_key", "label": "API client" },
  "assignee_team_id": null,
  "assignee_user_id": null,
  "resolution": {
    "by": { "type": "api_key", "id": "22e9f8d8-ae2b-47f9-a1fc-d29cf8440271", "label": "API client" },
    "values": { "decision": "approve", "note": "Supplier confirmed the corrected quantity by email." },
    "at": "2026-08-29T11:32:22.140Z"
  },
  "feedback": {
    "proposal_verdict": "incorrect",
    "correction": "Treat a missing quantity as reviewable, not a hard hold.",
    "generalize": true
  }
}

The review interview

POST /v1/reviews/:reviewId/interview runs one turn of a natural-language interview that fills the resolution form for the reviewer: send message (max 4000 chars) plus the prior transcript (client-held — the server keeps no interview state), and receive reply (a focused question, or a readback of what will be submitted), proposed_values (null until intent is clear), proposed_feedback, ready, and warnings. ready is only ever true after the proposed values validate against the review's input contract. Submission stays on POST /:reviewId/resolve — the interview never resolves anything itself.

POST /v1/reviews/:reviewId/assign routes a review to a team_id (see Review Teams) or a user_id; POST /v1/reviews/:reviewId/cancel withdraws it. Both are operate-tier and return the updated review / { "cancelled": true }.

Rule candidates and precedents

Feedback is never a dead end. A resolution whose feedback sets generalize: true becomes a rule candidate: GET /v1/apps/:id/rule-candidates lists the queue (each carrying the source review, the correction text, and a compiled proposed_card once promoted), POST /v1/rule-candidates/:candidateId/promote drafts the correction into the app's draft version — it never publishes — and POST /v1/rule-candidates/:candidateId/dismiss clears it. Resolved reviews also become precedents: GET /v1/apps/:id/precedents returns the approved resolved-review memory, filterable by similarity via ?similar_to=<JSON object of match keys> (422 for non-JSON), injected into Assisted drafting context and retrievable by external agents.

Queue and read rule candidates

A rule candidate does not have to come from a review. POST /v1/apps/:id/rule-candidates queues one found outside the review loop, for a miner that reads the registry or an ERP change log. The body carries the rule sentence the human approves or dismisses (up to 2000 characters), a miner-stable external_key (up to 120), and the source: registry, erp or both. title, evidence (a free-form object for the reviewer: support, counter, counter_names, items, repair, area, examples, counterexamples, changes) and an already-compiled proposed_card are optional. When proposed_card is present, promotion drafts it as is.

The call is idempotent on external_key. Re-submitting a key refreshes an open candidate's sentence, evidence and card and answers created: false; for a promoted or dismissed candidate it refreshes only the evidence, and the candidate keeps its decision. The candidate waits for a human. The call never changes the app's logic, and promotion still lands in the draft. It answers 200 whether it created or refreshed, with the candidate and a created flag, and 501 in a deployment without rule candidates. It needs the configure tier on the app.

POST/v1/apps/:id/rule-candidates

Body

rule*stringThe rule sentence the human approves or dismisses, up to 2000 characters.
external_key*stringMiner-stable id, up to 120 characters. The same key refreshes the existing candidate instead of adding a duplicate.
source*stringregistry, erp, or both.
titlestring | nullShort title, up to 200 characters.
evidenceobject | nullEvidence for the reviewer: support, counter, counter_names, items, repair, area, examples, counterexamples, changes.
proposed_cardobject | nullAn already-compiled rule card; promotion drafts it as is.

curl — queue a mined rule

curl -s -X POST https://api.talonic.com/v1/apps/$APP_ID/rule-candidates \
  -H "Authorization: Bearer $TALONIC_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "rule": "Hold any invoice whose quantity differs from the order by more than 5 percent.",
    "external_key": "erp-delta-2026-10-qty-tolerance",
    "source": "erp",
    "evidence": { "support": 41, "counter": 2 }
  }'
# → { "candidate": { "id": "…", "state": "open", "source": "erp", … }, "created": true }

GET /v1/rule-candidates is the approval queue across every app of the workspace: candidates newest first, at most 500 rows, each with the owning app's app_slug and app_display_name. state filters by lifecycle state (open, promoted, dismissed). It needs the read tier. Promote and dismiss stay per candidate, as described above.

GET/v1/rule-candidates

Query parameters

statestringopen, promoted, or dismissed.

Candidate fields (candidates[])

id, app_iduuidThe candidate and its app.
app_slug, app_display_namestring | nullThe owning app. Present on this cross-app list.
correctionstringThe rule sentence.
sourcestringreview, registry, erp, or both.
source_review_iduuid | nullThe review whose feedback produced the candidate. Null for mined candidates.
title, external_key, created_bystring | nullTitle, the miner's key, and who queued it.
evidenceobject | nullEvidence for the reviewer.
proposed_cardobject | nullA compiled rule card, when one exists.
evidence_lapsedobject | nullSet while the mining app's evidence no longer supports the rule: since, reason (below_threshold, stale, timing, not_discriminating), status, detail, kept. Promotion refuses a lapsed candidate.
statestringopen, promoted, or dismissed.
promoted_versioninteger | nullThe draft version the promotion landed in.
created_at, updated_atdate-timeRow timestamps.
Feedback changes context and produces candidates; it never changes versioned logic silently. A promoted candidate lands in the draft, where the normal review-diff-publish ceremony still applies — so every behavioral change traces to a human publish, with the review as its justification.

Frequently asked questions

Who may resolve which review kinds?+
approval: humans only, and never the raiser (separation of duties). resolution and judgment: a human, or a machine caller with an operate grant on the review's app (legacy write scope for zero-grant keys). data_request: any authorized actor, including agents. The resolve endpoint enforces this per kind.
Is resolving idempotent?+
Re-submitting the same resolution is idempotent on the resolution hash; a second, different resolution of an already-resolved review is rejected with 409. Design agents to treat a 409 here as "a human (or another agent) got there first" and re-read the review.
Does the interview endpoint store the conversation?+
No. The transcript lives with the client and is sent whole on each turn; the server validates any proposed values against the input contract and returns the next turn. This keeps the endpoint stateless and lets a UI resume or abandon an interview freely.
What makes something an "exception" rather than a review?+
Provenance, not shape. Exceptions are exactly the reviews whose raised_by.type is "system" — threshold breaches, validation failures, fallback holds. GET /v1/apps/:id/exceptions is a filtered view of the same rows the reviews endpoints return.
How do precedents reach an external agent?+
Two ways: GET /v1/apps/:id/precedents (optionally similarity-filtered with ?similar_to) for explicit retrieval, and the precedents reference block assembled into each run's input package, listed in the run's precedents_applied. Withdrawn precedents stop injecting while ledger history stands.