Skip to main content

Documents, extractions, jobs and schemas

These tools cover the day-to-day housekeeping of a workspace: listing documents, reading a document again, correcting values, running one saved schema over many documents as a job, and changing or removing saved schemas. Every call runs as the person behind the connection: a document that person cannot see answers 404, exactly like a missing one.

The tools are listed when the connection can read the workspace's documents; changes need the write scope. talonic_delete_document and talonic_delete_schema cannot be undone, and talonic_update_schema with a new field list removes every field you do not send again. Agents confirm with the user before calling them. Re-extracting a document and creating a job consume credits and are not deduplicated: after a timeout, check the first call's result before calling again.

talonic_list_documents

List documents, newest first, one page at a time. Returns data[] (id, filename, pages, status, source, field count, created_at) and pagination { total, limit, has_more, next_cursor }.

ParameterTypeDescription
statusstringOnly documents with this status, e.g. `error`.
source_idUUIDOnly documents from this source.
source_typestringOnly documents from this kind of source.
searchstringFilename contains (case-insensitive).
parent_idUUIDOnly documents unpacked from this one (email attachments, archive members).
relationstringOnly nested documents of this kind.
top_levelboolean`true` hides nested documents.
text_degradedboolean`true`: only documents whose text could not be read verbatim.
limitintegerItems per page, 1-100. Default 20.
cursorstring`pagination.next_cursor` of the previous page.
orderasc | descBy creation time. Default desc (newest first).
afterISO-8601Only items created after this time.
beforeISO-8601Only items created before this time.

talonic_reextract_document

Read an existing document again and capture its values afresh, without uploading it again. Consumes credits like a new extraction. Answers at once with status: processing; poll talonic_get_document until it is completed.

ParameterTypeDescription
document_id *UUIDThe document.

talonic_delete_document

Delete one document with its captured values. Cannot be undone. Documents only shared with the user are read-only and answer 404. Returns { deleted: true, id }.

ParameterTypeDescription
document_id *UUIDThe document.

talonic_list_extractions

List extractions, one per document with captured values, newest first. An extraction's id is its document's id.

ParameterTypeDescription
document_idUUIDOnly this document's extraction.
statuscomplete | failedOnly finished or failed ones.
limitintegerItems per page, 1-100. Default 20.
cursorstring`pagination.next_cursor` of the previous page.
orderasc | descBy creation time. Default desc (newest first).
afterISO-8601Only items created after this time.
beforeISO-8601Only items created before this time.

talonic_get_extraction

One extraction in full: every field with its value, type and confidence.

ParameterTypeDescription
extraction_id *UUIDThe extraction (document) id.

talonic_get_extraction_data

One extraction's values as a flat field → value map, or as a one-row CSV ({ format: 'csv', csv }).

ParameterTypeDescription
extraction_id *UUIDThe extraction (document) id.
formatjson | csvDefault json.

talonic_correct_extraction

Correct captured values. Each correction is kept as a new version of the value, attributed to the connection. A value a reviewer confirmed, or one waiting for approval, is not overwritten: it is reported in cells_skipped. Returns the extraction with cells_written and cells_skipped.

ParameterTypeDescription
extraction_id *UUIDThe extraction (document) id.
values *object`{ <field_name>: corrected value }` for the fields to change.

talonic_list_jobs

List jobs (one saved schema run over a set of documents), newest first.

ParameterTypeDescription
statusstringOnly jobs with this status.
limitintegerItems per page, 1-100. Default 20.
cursorstring`pagination.next_cursor` of the previous page.
orderasc | descBy creation time. Default desc (newest first).
afterISO-8601Only items created after this time.
beforeISO-8601Only items created before this time.

talonic_get_job

One job's status, schema, document count, timestamps and error. Poll it after talonic_create_job.

ParameterTypeDescription
job_id *UUIDThe job.

talonic_get_job_results

A job's result rows: one per document with its values, confidence and validation flags. Readable while the job still runs.

ParameterTypeDescription
job_id *UUIDThe job.

talonic_create_job

Run a saved schema over many documents and collect one row of values per document. Consumes credits per document. Name the documents, or pass all_documents: true for every completed document of the workspace. Returns the job id; poll talonic_get_job.

ParameterTypeDescription
schema_id *UUIDThe saved schema to run.
document_idsUUID[]The documents to process.
all_documentsboolean`true`: every completed document, instead of `document_ids`.
namestringA name for the job, up to 200 characters.

talonic_cancel_job

Cancel a pending or running job; rows already produced stay. Safe to retry: a job that already ended answers 409 and is left as it is.

ParameterTypeDescription
job_id *UUIDThe job.

talonic_update_schema

Rename a saved schema, change its description, or replace its field list. A new definition or fields list replaces every field, so read the schema first with talonic_get_schema and send the whole list. A schema managed by a Spec answers 409; change the Spec in the app instead.

ParameterTypeDescription
schema_id *stringUUID or SCH-XXXXXXXX short id.
namestringNew name, up to 100 characters.
descriptionstring | nullNew description; null clears it.
definitionobjectThe full field list as JSON Schema: `{ properties, required }`.
fieldsobject[]The full field list as rows: `field_name`, `display_name`, `data_type`, `description`, `is_required`.

talonic_delete_schema

Delete a saved schema. Cannot be undone; documents already extracted with it keep their values. A schema managed by a Spec answers 409.

ParameterTypeDescription
schema_id *stringUUID or SCH-XXXXXXXX short id.