Skip to main content
POST
Useful when you want to stage files now and process them in a separate batch later. Each upload creates its own single-file collection and returns its file_collection_id. To process it, call Run Uploaded File with that id. (For upload-and-process in one call, use Run Workflow instead.)
file_collection_id is the handle you run and poll — see Packets and files. file_id identifies the single file within it (used for reading that file’s content/results).

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Path Parameters

workflow_id
string
required

Body

multipart/form-data
file
file | null

Response

Successful Response

Confirmation that a file was uploaded successfully without triggering extraction.

status
string
required

Upload result: uploaded on success.

Example:

"uploaded"

filename
string | null

Name the file was stored under. Auto-renamed with a (n) counter when it collides with an existing file in the workflow; original_filename then holds the name you uploaded.

Example:

"invoice.pdf"

original_filename
string | null

The name you uploaded, present only when the file was auto-renamed to avoid a duplicate name in the workflow. null when filename is the name you uploaded.

Example:

"invoice.pdf"

file_collection_id
string | null

The collection UUID the file was uploaded into. Use it to poll results via GET /v2/workflows/{workflow_id}/files/{file_collection_id}/results/.

Example:

"069dcc2c-e14c-7606-8000-2ee4fb17b4e1"

file_id
string | null

The UUID of the uploaded file. Pass it to POST /v2/workflows/{workflow_id}/files/{file_id}/run/ to start extraction.

Example:

"069dcc2c-e14c-7606-8000-2ee4fb17b4e2"