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 https://api.plextera.com/api/public/v1/files \
> -H "Authorization: api-key YOUR_API_KEY" \
> -F "file=@lab-result.pdf"
1{
2 "id": "file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM",
3 "fileName": "lab-result.pdf",
4 "mimeType": "application/pdf",
5 "sizeBytes": 63877,
6 "contentUrl": "https://files.plextera.com/acme/2026/06/23/lab-result_01JY7M4ZVX.pdf?Expires=1782825600&KeyName=key1&Signature=abc123"
7}

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, sizeBytes, 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 lab-result.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.