Skip to main content
Ingestly processes documents asynchronously. The trigger answers as soon as the document is stored, and you follow the run with read requests until it finishes. Every step below uses an API key with the scope it names.

1. Submit the document

Trigger the workflow (workflows:trigger). Send a reference so you can match the result to your own record later:
Store both ids. When status is held, runId is null: the document waits until someone runs it. Find its run later with list the runs of a document (runs:read), which returns the document’s runs newest first.

2. Poll the run

Get the run (runs:read) until its status is final:
Poll every few seconds and back off for long runs: a run in review or waiting can take hours. Polling counts against the plan’s read limit, not the trigger limit, and costs no credits.
A runId from the trigger can answer 404 Not Found for a moment before the run is created, and stays 404 if the run never starts, for example when the workflow stops running automatically before the document is processed. Get the document (documents:read): its status (such as failed, cancelled or held) tells you what happened.

3. Follow review tasks

While a run is in review, list review tasks (reviews:read) filtered by runId. The filter also matches tasks of reusable sections the run called:
The list is paged: pass page (from 1) and pageSize (default 20, at most 100). The response carries count (total items), pages (total pages) and data. A task’s decision is approved or rejected once a person finished it; reviews themselves happen in the review queue.

4. Collect the output

When the run is completed, get its output (runs:read). The output is what the workflow’s Download Output node captured:
  • JSON output arrives as a JSON value, text formats (CSV, XML, YAML, plain text) as a string, and binary formats as a base64 string with isBase64 set to true.
  • With several Download Output nodes, pass nodeId to choose one; without it, the most recently started one answers. A nodeId that is not a node of the graph the run executed returns 404 Not Found.
  • 409 Conflict means the run has not completed or captured no output. 413 Content Too Large means the output exceeds the 10 MB that can be returned inline; download it from the run in the dashboard instead.
To fetch the file you submitted, download the document’s original file (documents:read). It returns a url valid for 5 minutes (until expiresOn); request a new one after it expires.

Reading responses safely

  • Errors are RFC 7807 problems served as application/problem+json; branch on the HTTP status and log the detail.
  • Ignore fields you do not recognize, and treat an unknown status or enum value as “not final yet”. New fields and values can appear without notice.
  • All timestamps are UTC (ISO 8601).