Skip to main content
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

ParameterTypeDescription
idstringThe unique workflow ID

Request Body

All fields are optional — call with an empty body {} to run against default sample data.
FieldTypeDescription
overridesobjectSample trigger payload used in place of real trigger data
overrides.author_urlstringAuthor URL to feed the workflow
overrides.textstringPost text
overrides.post_urlstringPost URL
overrides.likesintegerLike count
overrides.commentsintegerComment count
overrides.date_postedstringISO 8601 timestamp
overrides.sourcestringTrigger source label (for example linkedin, x, reddit)
test_configobjectTest execution configuration
test_config.modestringExecution mode. Must be "real_with_override" (default — can be omitted)
test_config.strict_data_validationbooleanFail the run on step input/output schema mismatches (default true)
test_config.action_mocksobjectMap 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

FieldTypeDescription
messagestringHuman-readable status message
successbooleantrue on success
dataobjectThe test run handle (see below)
The data object contains:
FieldTypeDescription
test_run_idstringExecution run ID — use this with Get Execution Detail to poll status
workflow_idstringThe ID of the workflow that was tested
trigger_typestringThe 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.