Skip to main content

Overview

The File API lets you upload files that your workflows take as inputs (type: file or array_files). Uploading is a two-step process: request a presigned URL from Opus, then upload the file’s binary content directly to that URL.

Base URL

All API requests should be made to the following base URL:

Authentication

The Get Upload URL endpoint requires authentication with your Opus API key, sent in the x-service-key header.
A request with a missing, invalid, or expired key returns 401.
The Upload File step goes to AWS S3, not the Opus API — do not include the x-service-key header on that request.
Your API key is a unique, secret credential. Store it securely and never expose it in client-side code.

Upload Flow

The typical flow for uploading a file follows these steps:
1

Get a Presigned URL

Request an upload URL using POST /upload/presigned, providing the file extension and a target workspaceId or workflowId. Call it once for each file you need to upload.
2

Upload the File

PUT the file’s raw binary content to the returned presignedUrl with the matching Content-Type header.
3

Reference the File

Use the fileUrl returned by Get Upload URL as the input value in your Execute Case payload.

Usage Notes

  • Size limit: Files exceeding 10 MB are rejected.
  • One URL per file: Each presigned URL covers a single file — request a new one for every upload.
  • Workspace check: Every upload is checked against a workspace; provide either workspaceId or workflowId when requesting the URL.
  • Access scope: Files are uploaded as unlisted by default — tracked by the platform but not shown in the file library. Pass accessScope: "workspace" to make them visible there.
  • Supported types: .pdf, .docx, .csv, .xls, .xlsx, .txt, .json, .html, .xml, .jpeg, .jpg, .png — see Get Upload URL for the full table.

Available Endpoints

Get Upload URL

Generate a presigned URL for uploading a file

Upload File

Upload your file’s binary content to the presigned URL