Batch Run Workflow
This endpoint allows you to efficiently initiate large batches of workflow runs in a single request (up to 1,000 in a single request, but you can queue up multiple batches in rapid succession). It accepts an array of inputs, each containing a file and metadata pair. The primary use case for this endpoint is for doing large bulk runs of >1000 files at a time that can process over the course of a few hours without needing to manage rate limits that would likely occur using the primary run endpoint.
Unlike the single Run Workflow endpoint which returns the details of the created workflow runs immediately, this batch endpoint returns a batchId
.
Our recommended usage pattern is to integrate with Webhooks for consuming results, using the metadata
and batchId
to match up results to the original inputs in your downstream systems. However, you can integrate in a polling mechanism by using a combination of the List Workflow Runs endpoint to fetch all runs via a batch, and then Get Workflow Run to fetch the full outputs each run.
Processing and Monitoring:
Upon successful submission, the endpoint returns a batchId
. The individual workflow runs are then queued for processing.
- Monitoring: Track the progress and consume results of individual runs using Webhooks. Subscribe to events like
workflow_run.completed
,workflow_run.failed
, etc. The webhook payload for these events will include the correspondingbatchId
and themetadata
you provided for each input. - Fetching Results: You can also use the List Workflow Runs endpoint and filter using the
batchId
query param.
Headers
Bearer authentication of the form Bearer <token>, where token is your auth token.
API version to use for the request. If you do not specify a version, you will either receive a 400 Bad Request
or be set to a previous legacy version. See API Versioning for more details.
Request
The ID of the workflow to run. This ID will start with “workflow_”. This ID can be found viewing the workflow on the Extend platform.
Example: "workflow_BMdfq_yWM3sT-ZzvCnA3f"
An array of input objects to be processed by the workflow. Each object represents a single workflow run to be created. The array must contain at least 1 input and at most 1000 inputs.
An optional version of the workflow to use. This can be a specific version number (e.g., "1"
, "2"
) found on the Extend platform, or "draft"
to use the current unpublished draft version. When a version is not supplied, the latest deployed version of the workflow will be used. If no deployed version exists, the draft version will be used.
Response
Successfully queued batch workflow run
Indicates whether the batch request was successfully accepted and queued. true
signifies success.
A unique identifier for the submitted batch. This ID can be used to correlate the workflow runs created by this request. You can find this batchId
associated with individual runs when listing workflow runs or in webhook payloads.