Skip to main content
POST
Rate limit tier: submission, 60 requests/min. See Rate limits. Starts a run of a workflow that begins at an Input node. The body carries the values in metadata; no file is sent. The Input node is in alpha and enabled per organization. The 202 response returns the new run_id. Poll GET /v3/runs/{run_id}/ until status is terminal. The values become a document packet of their own. They are stored as its metadata, and as its one file, input-<id>.json, so the packet reads like any other. GET /v3/document-packets/{document_packet_id}/ returns both. Each field takes the value under its result key. A value has to be what its field takes: a string, a number, YYYY-MM-DD for a date, an option name for an enum, a list of option names for a multi-select, a list of objects for a table. A field left out is empty, and a key no field declares is ignored. The full table is on the Input page. A workflow that starts at a document is refused with 400 and error_code: "INVALID_VALUE", before anything is stored. Send its document to POST /v3/workflows/{workflow_id}/upload/run/ instead. A value of the wrong type refuses the run with 422 and error_code: "INPUT_VALUES_REFUSED". params.keys names each key and params.expected, at the same position, says what it takes. Nothing runs and nothing is billed. A Word template that reads an unknown field refuses the run with 422 and error_code: "REPORT_TEMPLATE_UNFILLABLE". params.placeholders names the keys the template reads that the Input node does not declare. Run a chosen version with workflow_version_id. It takes a version_id from GET /v3/workflows/{workflow_id}/versions/. Without it, the latest version runs. Retries are safe with Idempotency-Key. Retrying with the same key replays the original packet and run. See Idempotency.

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string | null

Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet and run: no second packet, no second run.

X-Anyformat-Priority
string | null

Path Parameters

workflow_id
string
required

Body

application/json

Body of the run trigger for a workflow that reads no document.

metadata
Metadata · object
required

The values of the workflow's input node, keyed by each field's result key. A string field takes a string, a number field a number, a date field YYYY-MM-DD, an enum one of its option names, a multi-select a list of option names, and a table a list of objects keyed by column.

Example:
workflow_version_id
string | null

A version_id from GET /v3/workflows/{workflow_id}/versions/. Runs the packet on that version instead of the latest one. A version of another workflow answers 404.

Minimum string length: 1

Response

Successful Response

202 response for the two workflow run triggers: the run, and the version it runs on.

run_id
string
required

Unique identifier of the new run (hyphenated UUID).

Example:

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

document_packet_id
string
required

The document packet the run executes on (hyphenated UUID).

Example:

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

workflow_id
string
required

The workflow being run (hyphenated UUID).

Example:

"0686bb97-8c30-70f0-8000-97669e000eb8"

status
enum<string>
required

Status at acceptance time — normally queued.

Available options:
queued,
in_progress,
processed,
error,
cancelled
Example:

"queued"

workflow_version_id
string | null

The version of the workflow that runs: a version_id from GET /v3/workflows/{workflow_id}/versions/. The key is absent when the version is not known.

Example:

"FGaV4I2JAA"