Skip to main content
POST
Uploads a file and initiates an extraction process using the specified template.

Usage Notes

  • Maximum file size: 1GB
  • Files are processed according to the specified template
  • Use the metadata parameter to include custom data (like user IDs, reference numbers) that will be preserved across all extraction API responses and webhooks
  • Metadata is useful for tying back extractions to your systems, correlation, and application integration purposes
  • Configure webhooks for asynchronous notifications when extractions complete

Request

file
required
The file to upload and process. Supported formats include PDF (.pdf), Excel (.xlsx, .xls), CSV (.csv), TSV (.tsv), and image files (.jpg, .png, .webp, .tiff). Only one file can be uploaded per request.
string
required
The ID of the template to use for mapping the document data during extraction. You can also pass "auto" and TableFlow will automatically select the best template based on the document content and template file type settings.
string
Optional name for the extraction. This is useful for identifying extractions in the TableFlow UI and can be used to label extractions in your workflow.
string
Optional extraction guidance to provide additional context to the AI during extraction. Use this to give hints about the document structure, specific values to look for, or any other information that might help improve extraction accuracy.
string
Optional JSON string containing custom metadata to associate with this extraction. This can include any information you need to reference, such as user IDs, order numbers, or other contextual data. The metadata will be included in all extraction responses (API endpoints and webhooks), making it useful for correlating extractions with your application.Example: {"user_id": "123", "reference": "INV-2023-04-15", "source": "mobile-app"}

Response

string
The unique identifier for the new extraction.
string
The ID of the workspace this extraction belongs to.
string
The ID of the template used for the extraction.
string
The current status of the extraction, typically “processing” for a new upload.
object
Additional metadata associated with the extraction.
integer
Unix timestamp when the extraction was created.
integer
Unix timestamp when the extraction was last updated.

Error Responses

string
Error message describing what went wrong.

What Happens After Upload

After successfully uploading a file, the extraction process follows these steps:
  1. Processing - The file is being analyzed and data is being extracted
  2. Completed - Data extraction has finished successfully
  3. Failed - An error occurred during extraction
You can check the status of an extraction using the Get Extraction endpoint:
For real-time notifications when extractions complete, configure webhooks to receive events.

File Type Support

TableFlow supports the following file types:

PDFs

  • Digital (text-based) PDFs
  • Scanned (image-based) PDFs
  • Multi-page documents

Spreadsheets

  • Excel files (.xlsx, .xls)
  • CSV files (.csv)
  • TSV files (.tsv)
  • Multi-sheet workbooks

Images

  • JPEG files (.jpg)
  • PNG files (.png)
  • WebP files (.webp)
  • TIFF files (.tiff)