POST /api/v1/simulate
Run a simulation against a customer segment to preview how a Decision Flow would perform. Creates a simulation-run record for tracking. Supports A/B comparison mode.
Rate limit: 20 requests/min (expensive compute). Timeout: 120 seconds.
Request Body
Compare Mode
When compare is provided, the API runs two simulations side-by-side: scenario A uses the top-level config, and scenario B merges the compare object with segmentId. The response contains both results for comparison.
Example
Response
Returns the simulation-run record with the results merged in.
On failure, the run status is set to "failed" and a 500 error is returned.
GET /api/v1/simulate
List past simulation runs for the tenant. Supports pagination.
Query Parameters
Response
Roles
admin, editor
Use the Simulate API during development and testing to validate Decision Flow configurations without polluting production interaction history.