Skip to main content

Pending Type Confirmations

Settle the new document types Talonic proposes: list them with suggestions, create or merge one or up to 200 at once, merge several into one, or dismiss them.

When a document fits none of the workspace's types well, Talonic proposes a new type and holds it, with its documents, until someone decides. These are pending type confirmations. The same screen in the web app shows them under the document type settings; these routes let an integration or an agent settle them instead.

GET /v1/document-types/pending-confirmations returns the proposals grouped into three suggestions. auto_create holds proposals that look new and can be created as they are. inter_pending_clusters holds groups of proposals that look alike, each with a suggested_name, so you can merge them into one type. existing_match_candidates holds proposals that look like a type you already have, each with its best_existing_match. GET /v1/document-types/pending-confirmations/count returns just { count } for a badge.

Settle one proposal with POST /v1/document-types/pending-confirmations/{id}/resolve: create makes the proposed type, merge folds it into an existing type you name. Its documents move with it. resolve-batch settles up to 200 proposals in one call and reports a result per item, so one failure does not stop the rest. merge-pending merges several proposals into one new type with the name you choose, and auto-resolve settles every waiting proposal at once: each is matched to the standard type list and merged where a type exists, the rest are created. DELETE /v1/document-types/pending-confirmations/{id} dismisses a proposal without creating a type.

Who can call these routes. The reads need the read scope (or documents:read), and any member may call them. Every decision needs documents:write, and the key's person must be an Admin of the workspace, as in the web app; in a workspace whose model configuration Talonic manages, these return 403 insufficient_role, and Talonic settles proposals for you.

GET/v1/document-types/pending-confirmations

Response fields

auto_create[]arrayProposals that look new. Each carries its id, proposed_name, affected_document_count, up to 20 affected_documents (document_id, filename), the suggested standard type (suggested_ontology: type_id, category_id, subcategory_id) and best_existing_match (or null).
inter_pending_clusters[]arrayGroups of alike proposals: cluster_id, members[] (each with pairwise_similarities to the others), max_similarity, suggested_name.
existing_match_candidates[]arrayProposals close to an existing type, each with best_existing_match: type_id, type_name, similarity.
GET/v1/document-types/pending-confirmations/count
POST/v1/document-types/pending-confirmations/{id}/resolve

Body parameters

action*stringcreate or merge.
merge_into_type_iduuidThe existing type to merge into. Required for merge.

Merge a proposal into an existing type

curl -X POST https://api.talonic.com/v1/document-types/pending-confirmations/$PENDING_ID/resolve \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action": "merge", "merge_into_type_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"}'
POST/v1/document-types/pending-confirmations/resolve-batch

Request body — resolve-batch

{
  "items": [
    { "id": "4f3e2d1c-0b9a-4876-9543-210fedcba987", "action": "create" },
    { "id": "5a4b3c2d-1e0f-4a9b-8c7d-6e5f4a3b2c1d", "action": "merge", "merge_into_type_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
  ]
}
POST/v1/document-types/pending-confirmations/merge-pending
POST/v1/document-types/pending-confirmations/auto-resolve
DELETE/v1/document-types/pending-confirmations/{id}

Errors

Error responses

400validation_errorBad body (unknown action, more than 200 items), or a write made from the all-workspaces view.
403forbiddenreason: insufficient_scope, insufficient_role, no_person, person_inactive or workspace_read_only.
404not_foundThe proposal, or the type to merge into, does not exist in your workspace.

Frequently asked questions

What happens to the documents of a proposal?+
They move with it. Creating the proposed type gives them that type; merging gives them the type you merged into. Dismissing a proposal creates no type.
Does one failed item stop a resolve-batch call?+
No. Items are settled one by one and each gets its own result with success true or false, so check every result and retry only the failed ones.
When should I use auto-resolve?+
When you trust the standard type list to settle the queue: each proposal is merged into a matching type where one exists and created otherwise. Review the list first if your workspace uses its own naming.