Runs API
Execute and monitor workflow runs
Runs API
Execute workflows and monitor their execution progress, including step-by-step logs.
List Runs
Retrieve all workflow runs for your company with cursor-based pagination.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
workflowId | string | - | Filter by workflow ID |
status | string | - | Filter: pending, running, completed, failed, cancelled |
limit | number | 50 | Number of results (1-100) |
cursor | string | - | Cursor for pagination |
Response
Example
Get Run
Retrieve details of a specific workflow run. If the run is still in progress, status is automatically synced from Trigger.dev.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Run UUID |
Response
Step Results
Each step result includes:
| Field | Type | Description |
|---|---|---|
stepId | string | Step identifier |
status | string | success, error, skipped |
startedAt | string | ISO timestamp when step started |
completedAt | string | ISO timestamp when step completed |
durationMs | number | Execution time in milliseconds |
input | object | Resolved input passed to the step |
output | object | Output returned by the step |
error | object | Error details if step failed |
attempt | number | Retry attempt number |
Get Run Logs
Retrieve execution logs for a workflow run with step-by-step details.
Response
Failed Step Example
Cancel Run
Cancel a running or pending workflow execution.
Cancellable States
| Status | Cancellable |
|---|---|
pending | Yes |
running | Yes |
completed | No |
failed | No |
cancelled | No |
Response
Error Response (Invalid State)
Retry Run
Retry a failed workflow run from the first failed step. The original input is preserved.
Retriable States
| Status | Retriable |
|---|---|
pending | No |
running | No |
completed | No |
failed | Yes |
timeout | Yes |
cancelled | No |
Response (202 Accepted)
Error Response (Invalid State)
Restart Run
Restart a failed or completed run from a specific step. This enables "time travel" debugging - you can re-execute from any step while preserving outputs from previous steps.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
fromStepId | string | Yes | Step ID to restart from (inclusive) |
overrideInput | object | No | Override/merge input fields |
Restartable States
| Status | Restartable |
|---|---|
pending | No |
running | No |
completed | Yes |
failed | Yes |
timeout | Yes |
cancelled | No |
Response (202 Accepted)
How It Works
- Creates new run linked to the original via
restartedFromRunId - Preserves step outputs from steps before the restart point
- Executes from specified step with hydrated context
- Supports input override to test with modified data
Example: Debug a Failed Step
Error Response (Invalid Step)
Run Statuses
| Status | Description |
|---|---|
pending | Queued for execution, waiting to start |
running | Currently executing steps |
completed | All steps completed successfully |
failed | Execution stopped due to an error |
cancelled | Manually cancelled by user |
suspended | Waiting for external input (e.g., approval) |
Trigger Types
| Type | Description |
|---|---|
api | Triggered via API call |
webhook | Triggered by webhook event |
schedule | Triggered by schedule |
manual | Triggered manually (e.g., via UI) |
Polling for Completion
To wait for a run to complete, poll the GET endpoint: