Simulate workflow execution
POST/workflows/{id}/simulate
Runs a dry-run simulation of the workflow against a synthetic event payload without executing real actions. Use this to test conditions and action configurations before activating a workflow in production.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Integer ID of the workflow to simulate. Example: |
Request body
Content type application/json.
| Field | Type | Required | Description |
|---|---|---|---|
event_payload | object | No | Synthetic event data to use as the trigger payload for the simulation. Structure should match the expected trigger event. |
Example
{
"event_payload": {
"lead": {
"id": 99,
"email": "test@example.test",
"source": "website",
"name": "Test Lead"
}
}
}
Responses
200 Simulation result showing which conditions matched and which actions would fire
Content type application/json, any.
Example
{
"simulation_id": "sim-abc123",
"workflow_id": 8,
"conditions_matched": true,
"actions_evaluated": [
{
"type": "send_email",
"would_execute": true,
"resolved_config": {
"template": "lead_welcome",
"to": "test@example.test"
}
},
{
"type": "assign_owner",
"would_execute": true,
"resolved_config": {
"user_id": 5
}
}
],
"notes": "Simulation complete. No real actions were executed."
}
404 Workflow not found
Example request
curl -X POST "https://{tenant}.faciotech.net/api/v1/workflows/{id}/simulate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"event_payload": {"lead": {"id": 99, "email": "test@example.test", "source": "website", "name": "Test Lead"}}}'