Trigger a test execution of a workflow with sample data.
Overview
The Test Workflow endpoint runs a workflow against supplied override data so you can validate its behaviour without waiting for a real trigger. The call is asynchronous — it returns a test_run_id immediately; poll Get Execution Detail or watch List Workflow Executions for the result.
Test runs execute real actions by default (for example sending a real Slack message or enriching a real profile). Use test_config.action_mocks to stub specific action outputs when you need to avoid side effects.
Authentication
Requires a valid API key. No special permission scope is needed beyond a valid key.
Key Features
- Real-With-Override Mode: Execute the workflow against supplied sample data
- Action Mocks: Optionally stub individual action outputs
- Strict Validation: Surface schema mismatches on step inputs before running
- Async Execution: Returns a run ID to poll; credits follow standard per-action pricing
curl -X POST "https://api.trigify.io/v1/workflows/wf_abc123/test" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"overrides": {
"author_url": "https://linkedin.com/in/jane-doe",
"text": "Excited to announce our Series B!",
"post_url": "https://linkedin.com/posts/jane-doe_activity-123",
"likes": 240,
"comments": 18,
"date_posted": "2026-04-14T09:00:00.000Z",
"source": "linkedin"
},
"test_config": {
"mode": "real_with_override",
"strict_data_validation": true,
"action_mocks": {
"slack-1": { "enabled": true, "output": { "ok": true } }
}
}
}'
Path Parameters
| Parameter | Type | Description |
|---|
id | string | The unique workflow ID |
Request Body
All fields are optional — call with an empty body {} to run against default sample data.
| Field | Type | Description |
|---|
overrides | object | Sample trigger payload used in place of real trigger data |
overrides.author_url | string | Author URL to feed the workflow |
overrides.text | string | Post text |
overrides.post_url | string | Post URL |
overrides.likes | integer | Like count |
overrides.comments | integer | Comment count |
overrides.date_posted | string | ISO 8601 timestamp |
overrides.source | string | Trigger source label (for example linkedin, x, reddit) |
test_config | object | Test execution configuration |
test_config.mode | string | Execution mode. Must be "real_with_override" (default — can be omitted) |
test_config.strict_data_validation | boolean | Fail the run on step input/output schema mismatches (default true) |
test_config.action_mocks | object | Map of stepId → { enabled, output } to stub individual action outputs |
Example Response
{
"message": "Test run initiated",
"success": true,
"data": {
"test_run_id": "test-1712880000000-AbCdEfGh",
"workflow_id": "wf_abc123",
"trigger_type": "workflows/new-post"
}
}
Response Fields
| Field | Type | Description |
|---|
message | string | Human-readable status message |
success | boolean | true on success |
data | object | The test run handle (see below) |
The data object contains:
| Field | Type | Description |
|---|
test_run_id | string | Execution run ID — use this with Get Execution Detail to poll status |
workflow_id | string | The ID of the workflow that was tested |
trigger_type | string | The trigger event name used for the test run. Derived from the workflow’s trigger.kind; defaults to "workflows/new-post" if the workflow has no trigger. One of workflows/new-post, workflows/engagement, workflows/webhook, or workflows/scheduled-trigger |
Credit Usage
Starting a test run is free. Actions executed during the run consume credits according to their per-action cost (see List Workflow Actions). Mocked actions do not consume credits.