Files

Upload documents, read their metadata, and download content

Files are the input to everything else in the Plextera Public API: you upload a document once, get back a fileId, and reference it in document extractions and workflow runs.

Upload a file

Send the document as a multipart file part:

curl -X POST https://api.plextera.com/api/public/v1/files \
-H "Authorization: api-key YOUR_API_KEY" \
-F "file=@invoice.pdf"
{
"id": "file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM",
"fileName": "invoice.pdf",
"mimeType": "application/pdf",
"size": 63877,
"contentUrl": "https://files.plextera.com/acme/2026/06/23/invoice_01JY7M4ZVX.pdf?Expires=1782825600&KeyName=key1&Signature=abc123"
}

Store the id - it is the fileId you pass to other endpoints.

Constraints:

  • Maximum size: 50 MB (larger uploads return 413 PAYLOAD_TOO_LARGE).
  • Supported types: PDF, JPEG, PNG, TIFF, WebP, DOCX, XLSX, PPTX, plain text, CSV, HTML, archives, audio, and video.
  • Executable and script files are rejected with 415 UNSUPPORTED_MEDIA_TYPE.

You do not always need a separate upload call. Document Insights accepts a direct multipart upload (POST /document-insights/extractions/upload) and public HTTPS URLs, and workflow runs accept multipart file parts. Use POST /files when you want to reuse one document across several calls or upload it ahead of time.

Get file metadata

curl https://api.plextera.com/api/public/v1/files/file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM \
-H "Authorization: api-key YOUR_API_KEY"

The response has the same shape as the upload response: id, fileName, mimeType, size, and a fresh contentUrl.

Download file content

There is no separate download endpoint. Instead, every metadata response carries contentUrl - a temporary, pre-signed link to the raw content. Download it directly, with no Authorization header:

# 1. Fetch metadata and extract the download link
CONTENT_URL=$(curl -s https://api.plextera.com/api/public/v1/files/file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM \
-H "Authorization: api-key YOUR_API_KEY" | jq -r .contentUrl)
# 2. Download the content
curl -o invoice.pdf "$CONTENT_URL"

contentUrl expires. Use it promptly and never store it - request GET /files/{fileId} again whenever you need a fresh link. The extraction document returned by Get extraction carries the same kind of temporary contentUrl for the source document.

Lifecycle and reuse

  • Reference the same fileId in any number of extractions and workflow runs.
  • Uploaded files are staged for processing, not long-term storage. Once a file is referenced by an extraction or a workflow run, Plextera keeps it with that run’s history; keep your own copy of anything you need independently of processing.