Skip to main content
POST
Create a workflow-test run against the current workflow draft. A run can execute one saved test, every test for one block, or every test in the workflow. The canonical route is flat: send workflow_id in the request body and optionally narrow execution with scope. If scope is omitted, every saved test in the workflow runs. The response is a run resource. Use its id with the run-id-first endpoints: Get Workflow Test Run, List Test Run Results. The request body has a workflow context and an optional scope:
  • omitted scope - run every saved test in the workflow.
  • scope.type = "single" - run one saved test by test_id.
  • scope.type = "block" - run every saved test for one block by block_id.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create a workflow test run. Provide a workflow_id, and optionally narrow execution with scope to a single test or one block. Omit scope to run every saved workflow test.

workflow_id
string
required
scope
WorkflowTestRunSingleScope · object

Run one saved workflow test in the workflow.

Response

Successful Response

A batch execution of a workflow's tests, with overall lifecycle, timing, and pass/fail counts.

id
string
required
workflow_id
string
required
workflow_version_id
string
required
trigger
TriggerInfo · object
required

Public summary of what started a run: just the trigger category.

The full per-variant detail (schedule_id, parent_run_id, sender, ...) is kept internally on StoredWorkflowRun.trigger but intentionally not exposed in the public API surface.

lifecycle
PendingWorkflowTestRun · object
required

The test run has been created but execution has not started.

timing
WorkflowTestRunTiming · object
required
total_tests
integer
required
target
WorkflowTestBlockTarget · object | null

Public workflow-test target.

The storage layer remains block-scoped today, but the API shape names the tested entity explicitly so workflow-level targets can be added later.

test_id
string | null
counts
BlockTestBatchExecutionCounts · object

Aggregate counts for a batch of block-test runs.

Each individual run contributes to exactly one lifecycle_counts bucket, and additionally to one outcome bucket when lifecycle_counts.completed is incremented.

freshness
ArtifactFreshness · object