Skip to main content

Overview

The Flow Runs API allows you to trigger flow executions, retrieve run details, monitor execution status, and manage running flows. Flow runs represent individual executions of your automation flows.

Base Endpoint

List Flow Runs

Retrieve a paginated list of flow runs with optional filters.

Query Parameters

string
required
Filter runs by project ID
string
Filter runs by specific flow ID
array
Filter by run status. Multiple values allowed.Values: RUNNING, SUCCEEDED, FAILED, PAUSED, QUOTA_EXCEEDED, INTERNAL_ERROR, TIMEOUT, STOPPED
array
Filter runs by tags
string
Filter runs that failed at a specific step
string
ISO 8601 timestamp - Filter runs created after this time
string
ISO 8601 timestamp - Filter runs created before this time
array
Filter by specific run IDs
boolean
default:"false"
Include archived runs in the results
number
default:"10"
Number of runs to return (1-100)
string
Pagination cursor from previous response

Response

array
Array of flow run objects (without step details for list view)
string
Cursor for next page (null if no more results)
string
Cursor for previous page (null if on first page)
Response Example

Get Flow Run

Retrieve detailed information about a specific flow run, including step execution data.

Path Parameters

string
required
The flow run ID

Response

Returns the complete flow run object including step-by-step execution data.
object
Dictionary of step execution results, keyed by step name. Contains input data, output data, duration, and status for each executed step.
Step data may be missing if:
  • The run has not started yet
  • The run is older than AP_EXECUTION_DATA_RETENTION_DAYS and data has been purged
string
ID of the file containing execution logs
Response Example

Retry Flow Run

Retry a failed or stopped flow run.

Path Parameters

string
required
The flow run ID to retry

Request Body

enum
required
Retry strategy to use:
  • FROM_FAILED_STEP - Resume from the failed step, preserving previous step outputs
  • ON_LATEST_VERSION - Restart the entire flow using the latest published version
string
required
Project ID (for authorization)

Response

Returns the new flow run object created by the retry operation.
Retry Strategies Explained:
  • FROM_FAILED_STEP: Efficient for transient failures. Reuses successful step outputs and only re-executes from the point of failure.
  • ON_LATEST_VERSION: Useful when you’ve fixed the flow definition. Starts fresh with the latest flow version.

Bulk Cancel Flow Runs

Cancel multiple paused or queued flow runs at once.

Request Body

array
Specific run IDs to cancel. If provided, other filters are ignored.
array
Run IDs to exclude from cancellation
string
Cancel all runs for a specific flow
array
Cancel runs with specific statuses: PAUSED, RUNNING
string
Cancel runs created after this timestamp
string
Cancel runs created before this timestamp

Response

Bulk Retry Flow Runs

Retry multiple failed flow runs at once.

Request Body

enum
required
Retry strategy: FROM_FAILED_STEP or ON_LATEST_VERSION
array
Specific run IDs to retry
array
Run IDs to exclude from retry
string
Retry all runs for a specific flow
array
Retry runs with specific statuses
string
Retry runs that failed at a specific step
string
Retry runs created after this timestamp
string
Retry runs created before this timestamp

Response

Bulk Archive Flow Runs

Archive multiple flow runs to clean up your run history.

Request Body

Accepts the same filters as bulk retry (except strategy).
array
Specific run IDs to archive
array
Run IDs to exclude from archiving
string
Archive runs for a specific flow
array
Archive runs with specific statuses
string
Archive runs that failed at a specific step
string
Archive runs created after this timestamp
string
Archive runs created before this timestamp

Response

Archived runs are not deleted but are excluded from default list queries unless includeArchived=true is specified.

Resume Paused Run (Human Input)

Resume a paused flow run that’s waiting for human input.

Path Parameters

string
required
The flow run ID
string
required
The request ID for the human input step

Request Body

The body should contain the response data expected by the human input step.

Response

Returns the step’s response after processing the input. For synchronous requests (/sync endpoint), returns the output immediately.

Flow Run Status

Status Types

Run Environments

  • PRODUCTION - Live executions triggered by real events
  • TESTING - Test runs triggered from the flow builder

Nested Flow Runs

Flows can trigger other flows, creating parent-child relationships.

Headers for Nested Runs

Data Retention

Flow run execution data (steps, logs) is retained for a configurable period defined by AP_EXECUTION_DATA_RETENTION_DAYS. After this period:
  • Run metadata (status, timestamps) is preserved
  • Step execution data is purged
  • Logs are removed
This helps manage storage costs for high-volume automations.

Error Responses

Run Not Found (404)

Best Practices

  • Use tags to categorize and filter runs
  • Set up alerts for failed runs
  • Regularly review failedStepName to identify problematic steps
  • Monitor stepsCount and execution duration for performance
  • Use FROM_FAILED_STEP for transient failures (network issues, rate limits)
  • Use ON_LATEST_VERSION after fixing flow logic
  • Implement exponential backoff for bulk retries
  • Consider max retry limits to avoid infinite loops
  • Archive old successful runs to improve query performance
  • Use date filters to query recent runs
  • Export important run data before retention period expires
  • Use pagination cursors for large result sets
  • Filter by flowId to reduce result set size
  • Use includeArchived=false (default) for faster queries
  • Avoid retrieving step data unless necessary
  • Cache run statuses when polling

Code Examples

Flows API

Manage the flows that create these runs

Connections API

Manage connections used during execution