Skip to main content
POST
/
v2
/
workflows
/
{workflow_id}
/
upload
/
curl -X POST 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/upload/' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@/path/to/document.pdf'
{
  "status": "uploaded",
  "filename": "document.pdf",
  "file_collection_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "file_id": "f0e1d2c3-b4a5-6789-0abc-def123456789"
}
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 Files and collections. file_id identifies the single file within it (used for reading that file’s content/results).
curl -X POST 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/upload/' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@/path/to/document.pdf'
{
  "status": "uploaded",
  "filename": "document.pdf",
  "file_collection_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "file_id": "f0e1d2c3-b4a5-6789-0abc-def123456789"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workflow_id
string
required

Body

multipart/form-data
file
string | null
text
string | 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 of the uploaded file.

Example:

"invoice.pdf"