Getting Started

v1

Use the Tables API to programmatically upload and process documents for structured data extraction. Perfect for automating document processing workflows.

1
Create an API Token
Generate a secret token to authenticate your API requests
1.

Access User Settings

Click on your profile in the left sidebar to open user settings

2.

Navigate to Secret Tokens

Switch to the "Secret Tokens" tab in the settings dialog

3.

Create New Token

Enter a name for your token, optionally set an expiration date, and click "Create Secret Token"

4.

Copy and Store Safely

Copy the generated token immediately - it won't be shown again. Store it securely.

2
Find the Extraction Schema ID
Locate the extraction schema you want to use for processing
1.

Navigate to Your Model

Go to the project and model you want to use for document processing

2.

Find the Extraction Schema ID

The extraction schema ID is displayed at the bottom of the Extraction Schema

3
Get Upload URL
Request a pre-signed URL for secure file upload to cloud storage
get-upload-url.js
4
Upload File
Upload your file using the signed URL returned from Step 3
upload-file.js
5
Process File
Trigger processing of the uploaded file to extract structured data. Choose between synchronous processing (immediate results) or asynchronous processing (queue job and poll for results).

Synchronous Processing

SYNC

Wait for processing to complete and receive results immediately. Best for small files and real-time workflows.

  • • Blocks until processing completes
  • • Returns data immediately
  • • Simple request-response pattern
  • • May timeout on large files

Asynchronous Processing

ASYNC

Queue the job and poll for results. Best for large files, batch processing, and scalable workflows.

  • • Returns immediately with job ID
  • • Poll for status and results
  • • Handles large files reliably
  • • Prevents duplicate processing

Option A: Synchronous Processing

process-file-sync.js

Option B: Asynchronous Processing

process-file-async.js

💡 When to use async processing:

  • • Large files that may take longer to process
  • • Batch processing workflows
  • • Integration with webhook notifications
  • • When you need to prevent duplicate processing
  • • Building scalable, non-blocking applications
6
Submit Corrections
Accept all extracted data or submit specific corrections to the processed results
submit-corrections.js

Smart Document Classification

Don't know which extraction schema to use? Let AI automatically determine the optimal processing pipeline for each document type with our classification system.

Automated Document Routing
Set up a classifier once, then let AI automatically route documents to the correct extraction schema based on content analysis

When to Use Classification:

  • • Mixed document types in one workflow
  • • Want to eliminate manual schema selection
  • • Processing unknown document formats
  • • Need intelligent document routing

Benefits:

  • • Automatic schema selection
  • • Improved extraction accuracy
  • • Simplified integration
  • • Handles multiple document types

Complete Examples

Here are complete working examples showing the full document processing workflow for both synchronous and asynchronous processing.

SYNC
Synchronous Processing (Wait for Results)
complete-example-sync.js
ASYNC
Asynchronous Processing (Queue and Poll)
complete-example-async.js

Get File Data

Retrieve processed document data using metadata from webhook events. This endpoint is specifically designed for webhook integration workflows.

7
Retrieve Data from Webhook Events
Use file and schema IDs from webhook notifications to fetch actual extracted data
get-file-data-webhook.js

Webhooks Integration

Get notified when documents are processed or reviewed. Webhook events contain metadata about the processed file, and you can retrieve the actual data using the get-file-data endpoint above.

Document Extracted
Triggered when document processing completes

Fires immediately after AI processing, whether successful or failed. Use to trigger downstream workflows.

View Documentation →
Document Reviewed
Triggered when all rows are accepted

Fires when human review is complete and all data is approved. Use to finalize workflows and export data.

View Documentation →

Response Format

After processing, you'll receive structured data organized by tables, columns, and rows:

example-response.json
{
  "message": "File processed successfully.",
  "fileId": "file_abc123",
  "jobId": "job_def456",
  "data": {
    "tables": {
      "table_id_1": {
        "id": "table_id_1",
        "name": "Invoices",
        "columns": [
          {
            "id": "col_1",
            "name": "Invoice Number",
            "type": "TEXT",
            "description": "Unique invoice identifier"
          },
          {
            "id": "col_2",
            "name": "Amount",
            "type": "NUMBER",
            "description": "Invoice total amount"
          }
        ],
        "rows": [
          {
            "id": "row_1",
            "index": "0",
            "status": "PENDING",
            "cells": {
              "Invoice Number": {
                "value": "INV-001",
                "columnId": "col_1"
              },
              "Amount": {
                "value": "1000.00",
                "columnId": "col_2"
              }
            }
          }
        ]
      }
    }
  }
}