Logo ExelensiaExelensia/Docs
Getting Started
  • Introduction
API Reference
  • Schemas
  • Templates
  • Upload
  • Process
  • Files
  • Results
  • Exports

Upload

The Upload API ingests a document in a single request. Send the file as multipart/form-data and the platform stores it and returns a file record you can process. If auto-processing is enabled for your account (the default), the file is also queued for extraction immediately.

Supported File Types

TypeMIME Type
PDFapplication/pdf
JPEGimage/jpeg
PNGimage/png
WebPimage/webp
DOCXapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
PPTXapplication/vnd.openxmlformats-officedocument.presentationml.presentation
XLSXapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
EPUBapplication/epub+zip
RTFapplication/rtf
ODTapplication/vnd.oasis.opendocument.text
CSVtext/csv
TXTtext/plain

Maximum file size: 50 MB (52,428,800 bytes)

Endpoints

POST /v1/upload

Uploads a document. The request must be multipart/form-data containing the file itself.

Form Fields

FieldTypeRequiredDescription
filefileYesThe document to upload. Must be a supported type and at most 50 MB.
schema_idstringNoSchema UUID to associate with this file. When auto-processing runs, this schema is applied.
Bash
curl -X POST \
  -H "x-api-key: wk_xxxxxxxx.your_secret_here" \
  -F "file=@invoice_2024_01.pdf;type=application/pdf" \
  -F "schema_id=019760a0-0001-7000-8000-000000000001" \
  "https://api.exelensia.com/v1/upload"

The file part is required. The schema_id part is optional — omit it to upload without associating a schema.

Response

JSON
{
  "file_id": "019760a0-0020-7000-8000-000000000020",
  "filename": "invoice_2024_01.pdf",
  "bytes": 245760,
  "mimetype": "application/pdf",
  "process": {
    "id": "019760a0-0030-7000-8000-000000000030",
    "status": "queued"
  }
}
FieldDescription
file_idUUID of the created file record — use it with the Process and Files APIs
filenameStored filename (sanitized)
bytesFile size in bytes
mimetypeDetected MIME type of the uploaded file
processThe extraction job that was queued automatically, as { id, status }, or null if auto-processing is disabled

Auto-Processing

When your account has auto-processing enabled (the default), the upload response includes a process object with status queued and the file begins extraction right away — you can skip the Process API and poll the Results API directly.

When auto-processing is disabled, process is null. Submit the file for extraction yourself via POST /v1/process.

Status Codes

StatusDescription
201File uploaded (and queued for processing if auto-processing is enabled)
400No file provided, unsupported MIME type, empty file, or invalid schema_id
401Missing or invalid authentication
413File exceeds the 50 MB limit
503The service is temporarily busy handling uploads — retry shortly

On this page

  • Supported File Types
  • Endpoints
  • POST /v1/upload