Workflows API
Create, manage, and execute workflow definitions
Workflows API
Manage workflow definitions including creation, updates, versioning, and execution.
List Workflows
Retrieve all workflows for your company with cursor-based pagination.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | - | Filter by status: draft, active, paused, archived |
search | string | - | Search by workflow name |
limit | number | 50 | Number of results (1-100) |
cursor | string | - | Cursor for pagination |
Response
Example
Create Workflow
Create a new workflow definition. Workflows are created in draft status.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workflow name (1-255 chars) |
description | string | No | Human-readable description |
trigger | object | Yes | Trigger configuration |
steps | array | Yes | Array of workflow steps |
inputSchema | object | No | JSON Schema for input validation |
outputSchema | object | No | JSON Schema for output |
settings | object | No | Workflow settings |
Example Request
Response (201 Created)
Get Workflow
Retrieve a specific workflow by ID.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Workflow UUID |
Response
Update Workflow
Update a workflow. If the workflow is active, this increments the version and saves the previous version to history.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated workflow name |
description | string | No | Updated description |
trigger | object | No | Updated trigger configuration |
steps | array | No | Updated steps array |
inputSchema | object | No | Updated input schema |
outputSchema | object | No | Updated output schema |
settings | object | No | Updated settings |
changeSummary | string | No | Description of changes (stored in version history) |
Example Request
Response
Delete Workflow
Soft delete (archive) a workflow. This also deletes any associated schedules.
Response
Activate Workflow
Change workflow status to active. This enables the workflow to be triggered.
Status Transitions
| From | To Active |
|---|---|
draft | Allowed |
paused | Allowed |
active | Not allowed (already active) |
archived | Not allowed |
Response
For schedule triggers, the response includes schedule information:
Pause Workflow
Pause an active workflow. Paused workflows won't be triggered.
Response
Run Workflow
Trigger a workflow execution via the API. Supports both async (default) and sync execution modes.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
input | object | No | Input data for the workflow |
connectionId | string | No | Specific connection to use |
idempotencyKey | string | No | Prevent duplicate runs (24h TTL) |
mode | string | No | async (default) or sync |
maxExecutionTimeMs | number | No | Max wait time for sync mode (1000-300000ms) |
onTimeout | string | No | Sync timeout behavior: return_run_id, throw_error |
onFailure | string | No | Sync failure behavior: throw_error, switch_to_async |
Async Mode (Default)
Returns immediately with a run ID. Poll the runs API for status updates.
Response (202 Accepted):
Sync Mode
Waits for workflow completion and returns the result directly. Ideal for short-running workflows in request/response scenarios.
Sync Success Response (200):
Sync Timeout Response (202):
When execution exceeds maxExecutionTimeMs with onTimeout: "return_run_id":
Sync Mode Parameters
| Parameter | Default | Description |
|---|---|---|
maxExecutionTimeMs | 30000 | Max wait time (1 second to 5 minutes) |
onTimeout | return_run_id | return_run_id returns gracefully, throw_error returns 408 |
onFailure | throw_error | throw_error returns error, switch_to_async returns run ID |
Sync mode is best for workflows completing under 30 seconds. For longer workflows, use async mode with polling or webhooks.
Idempotency
If the same idempotencyKey is used within 24 hours, the existing run is returned:
List Workflow Runs
Get runs for a specific workflow.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | - | Filter: pending, running, completed, failed, cancelled |
limit | number | 50 | Number of results (1-100) |
cursor | string | - | Cursor for pagination |
Response
Clone Workflow
Create a copy of an existing workflow.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for the cloned workflow |
Example Request
Response (201 Created)
Version Management
List Versions
Get all versions of a workflow.
Response
Get Specific Version
Response
Compare Versions
Compare changes between two versions.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | number | Yes | Source version number |
to | number | Yes | Target version number |
Response
Rollback Version
Restore a workflow to a previous version. This creates a new version with the old content.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
changeSummary | string | No | Reason for rollback |
Example Request
Response
Schedule Management
Get Schedule
Get schedule information for a workflow with schedule trigger.
Response
Update Schedule
Modify schedule configuration.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
cron | string | No | Cron expression |
interval | object | No | Interval configuration |
interval.value | number | Yes | Interval value |
interval.unit | string | Yes | minutes, hours, days, weeks |
timezone | string | No | IANA timezone |
enabled | boolean | No | Enable/disable schedule |
Example Request
Response
Manual Schedule Trigger
Manually trigger a scheduled workflow (for testing).
Response (202 Accepted)
Workflow Statuses
| Status | Description |
|---|---|
draft | Initial state, not yet activated |
active | Running and can be triggered |
paused | Temporarily disabled |
archived | Soft deleted |