Tables API
Create document tables, define extraction columns, connect collections, and query or export results.
List table classification rules and progress
List table classification rules and progress
Add AI classification column
Save a choice, boolean or rubric classification over selected data columns. Queues existing rows; automatic=true also classifies new or changed inputs. Uses typesafe-ai/jev through AI Gateway and consumes AI usage. Preview first. Other classification columns cannot be inputs. Rule names are display labels; use column IDs for inputs. Score values use zero-based fractional rubric positions.
Preview AI classification on up to five records
Runs the actual model on existing authorized records without changing table cells. Omit rowIds to sample the first five records by stable ID. WAITING means required inputs are not ready or are empty. UNCERTAIN is separate from failure. Boolean probability means P(true); score is a rubric position, not confidence.
Read table classification rule and progress
Read a table classification rule and progress
Update AI classification rule
Update an AI classification rule
Delete table classification column
Delete a table classification column
Reclassify changed, missing or selected table records
Queues a background classification scan. changed skips results with identical selected inputs and rules. all explicitly reruns every eligible record. Supply up to 100 authorized row IDs to restrict a run to a selection. Records and source permissions are checked again at execution. Does not rerun document extraction.
Generate PDF and chart previews without sending delivery
Queues a private report preview using the saved delivery filters, current access, and configured report instructions. Does not send email, invoke a webhook, enable the rule, or mark records delivered. Repeated requests reuse an in-progress preview. To view completed previews without generating new files, read delivery run history. Uses normal AI and sandbox limits.
Read or download generated table PDF or chart
Returns file metadata by default, or PDF/PNG bytes with format=file. Requires continued access to every source in the report; aggregates cannot be partially redacted. Files expire with the report after seven days.
List your saved table deliveries
List your saved table deliveries
Create saved table delivery
Defaults to paused. EMAIL supports up to 20 recipients; WEBHOOK requires public HTTPS and signs events. Runs as the authenticated creator. Enabled rules can send external data; configure only explicitly authorized destinations. Completion notifications use the same delivery settings.
Replace your table delivery settings
Use enabled:false to pause. Omit webhookSecret to keep the existing secret. Only the creator may edit a rule. Changing settings invalidates pending runs.
Delete your table delivery and its report history
Delete your table delivery and its report history
Preview selected table delivery columns and filters
Accepts columns, filters, and an optional date window. No delivery name, destination, or schedule is required. Read-only sample of up to 10 matching ready rows from the first 500 accessible sources. This preview does not send, save, or consume NEW delivery receipts. hasMore is not an exact count.
Read recent table delivery history
Read recent table delivery history
Queue explicitly requested table delivery now
Can send to external destinations, even when the saved schedule is paused. Reuse the same idempotencyKey after a timeout. Returns a durable run; poll history for success. Production workers deliver asynchronously.
Retry failed table delivery
Reuses the report snapshot and skips recipients already acknowledged. Settings must be unchanged and the report unexpired. An external acknowledgement can be lost; exactly-once delivery is not guaranteed.
Read delivered report as JSON or download CSV
Reports expire after seven days. Rechecks the caller’s current table and source access, including source-binding changes. JSON uses keyset pagination; follow nextCursor even when a page is empty. CSV streams all currently authorized snapshot rows and escapes spreadsheet formulas.
Search table directory filter options
Search table directory filter options
Create table from CSV
Create a table with managed record storage from a CSV and import every row in the same request. Call previewTableFromCsv first to see the proposed columns, types and key, then pass only what you want to change in columns (by the label from the preview: a new name, a type, or skip) and keyColumn when the proposed key is wrong or missing. Types are text unless every value is a number without a leading zero, a YYYY-MM-DD date or true/false, so codes like an NCM 01012100 keep their leading zero; the key column is text unless you change it. Each row’s externalKey is its key column value and must be unique in the file. Values follow the same rules as importTableRows, nothing is classified, and the import is upsert. If any write fails no table is created. Up to 20,000 rows and 8 MB of CSV. Omit applicationId for a personal table; an application table needs membership of the application, the same as createTable.
Propose table columns for CSV
Read a CSV and propose one column per CSV column with a name, a type and up to three sample values, plus a key column and the first five rows. Nothing is written. Use it before createTableFromCsv, or to check the headers before importTableRows. Repeated headers get labels like 'valor (2)' and blank ones 'Column N'; refer to columns by those labels. Types are text unless every value is a number without a leading zero, a YYYY-MM-DD date or true/false; the proposed key is the first column whose values are all present and unique, typed as text.
List automatically connected collections
List automatically connected collections
Keep table updated from collection
Creates or updates one persistent subscription per table/collection. Imports existing ready documents by default and automatically extracts new or changed documents. Source retries reuse the existing row. Set enabled=false to prepare or pause a connection and receive watch.discoveryPreview with a bounded count of ready versions awaiting discovery. Reconnecting retries scheduling failures. Uses the caller’s current access and usage limits. Generated Insights CSVs are excluded. Enabled connections start billable extraction in the background. Employee authoring tools default to paused; direct API callers retain the enabled default.
Disconnect table’s collection subscription
Stops future discovery and removes the subscription checkpoint. Existing table rows and documents are retained. Already dispatched extraction can finish.
List accessible document tables
Includes existing Document Site tables without copying them. Pages are zero-based, 30 tables per page.
Create document table
Create a document table
Get document table
Get a document table
Update table name and instructions
Update the table definition. Configure email notifications, reports and schedules through table deliveries. Unsupported settings are rejected.
Delete document table
Removes the table from lists and reads and stops its automatic work: the extraction in progress is cancelled, and collection connections, deliveries, classifications and conversation Insights no longer run for it. Rows, extracted values, source documents and history are kept. Deleting a table that is already deleted answers 404. The conversation-insights table of an agent that still exists cannot be deleted: that answers 409 with code `tables/linked-to-agent` and the agent in `details`.
List table columns and extraction instructions
List table columns and extraction instructions
Add columns and extract their values
Adds up to 12 columns and begins extracting them for existing sources. This is a billable extraction operation. Managed storage supports at most 100 columns; an oversized batch returns 422 with code tables/column-limit and adds no columns. Do not blindly retry a timed-out write; list columns first.
Update column and re-extract its values
Update a column and re-extract its values
Delete table column and its extracted values
Delete a table column and its extracted values
Get latest table CSV export
The CSV is the latest published snapshot, across all rows and columns. It does not apply the current grid filters. Download from downloadPath with the same credentials. documentId can also be passed to the existing document chat API to query the table.
Import CSV rows into table
Import a CSV into an existing table with managed record storage. First read listTableColumns, then map CSV headers to column IDs and pick the header whose value becomes each row’s externalKey. Values are checked against the column types like saveTableRecord: text is kept exactly (leading zeros too), decimals stay exact strings (a decimal comma is accepted in ;-separated files), dates are YYYY-MM-DD, timestamps ISO with a timezone, and empty cells stay absent. upsert inserts new keys and updates changed ones; re-running the same file changes nothing. replace also removes earlier imported rows whose key is missing from the file, in the same transaction. Rows with an empty key or a bad value are skipped and listed in errors; a key that repeats in the file rejects the whole import. Imported rows are not classified unless classify is true, which queues new and changed rows for the table’s automatic classification columns (one model call per row and column). Up to 20,000 rows and 8 MB of CSV run synchronously; larger files answer 413 until background imports ship. Requests over 10 MB in total are refused before they reach the API, so keep the CSV under 8 MB. Requires the same table access as saving a record.
Read, filter, and sort table records as JSON
Read authorized live rows with columns, source references, values and cellStatus keyed by column ID. Non-completed values are null. Start with no page or cursor, then follow pagination.type: page uses nextPage; cursor uses nextCursor and omits total unless count=exact. Cursor tables support source-name q, sourceType/externalKey, typed AND filters, id/createdAt/updatedAt/source or columnId:value sorts. Numbered tables support q over names and cell values, and source/columnId:value/columnId:score sorts. Unsupported options return 400. Both use 1–100 rows; sort ties are stable. Preserve the selection between cursor requests; 409 means restart. Table, owner and source permissions apply on every read. No CSV or warehouse load is required. These live pages are not frozen export snapshots. Source-name substring search, typed column filters and sorts, and exact counts may scan the full authorized table. Prefer indexed id, createdAt, updatedAt or source ordering for large tables.
Save record directly to table
Save supplied JSON values without document extraction. First read listTableColumns and key values by column ID. Supply a stable idempotencyKey for each business record and reuse it on retries: the same payload returns the original row; different values or a deleted row return 409. Missing columns are blank. Rows are immediately available through listTableRows; CSV and BigQuery publication is asynchronous. The API records the authenticated caller and external reference; native Docana agents attach their execution identity automatically. Requires the same table access as the UI.
Remove document table row
Remove a document table row
Run or stop table extraction
Run with scope 'all' (the default) starts a new extraction of every cell, including completed ones. Run with scope 'missing' keeps the current run and queues only cells that are empty, failed or still queued; use it to fill gaps or recover stuck cells without paying for completed ones. Stop cancels queued work and keeps the last completed value of cells that were only re-queued. Poll table rows for results. Run is billable; inspect state before retrying after a timeout.
Add documents or collections to table
Validates access to every source, then starts extraction. Upload files with the existing document upload API first. Collection sources produce one aggregate row per collection.
Suggest columns from goal and document samples
Suggest columns from a goal and document samples
Prepare table upload destination
Idempotently creates or reuses a private collection for a personal table, or the existing application collection. Upload through the document APIs, then add the returned document IDs using addTableSources.