Skip to main content
POST
Create a simulation

Authorizations

Authorization
string
header
required

Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"

Body

application/json
name
string
required

Required. A label for this simulation; shown in the list and on the report.

Example:

"booking-flow-voice"

channel
enum<string>
required

Required. The channel the assistant is tested on; the agent must have it connected (see /options).

Available options:
voice,
sms,
whatsapp,
whatsapp_call,
email,
instagram,
messenger
agent_uuid
string<uuid>
required

Required. The agent being tested; must have the chosen channel connected (422 otherwise).

test_cases
object[]
required

Required, at least one. Each is one scenario the assistant is scored against.

Minimum array length: 1
description
string | null

Optional. Free-text note about what this simulation verifies.

personas
object[] | null

Optional. The simulated customers. Omit to auto-generate them from the test cases at run time.

runs_per_case
integer
default:3

Optional. How many conversations to run per test case; criteria resolve by majority across them. Default 3.

Required range: 1 <= x <= 20
max_turns
integer
default:8

Optional. Max customer turns per conversation. Use 3-4 for smoke tests, 6-10 for discovery/booking flows. Default 8.

Required range: 2 <= x <= 30
pass_threshold
integer
default:80

Optional. Average score (0-100) at or above which the simulation is 'passed'. Default 80.

Required range: 50 <= x <= 100
call_mode
enum<string>
default:simulated

Voice only. real = the caller line dials the assistant's number with the persona taking over the call

Available options:
simulated,
real
caller_agent_uuid
string<uuid> | null

Required for call_mode=real: the agent whose line plays the customer (must differ from agent_uuid and have a phone line)

with_intents
boolean
default:false

The assistant uses its real intent tools; detected intents EXECUTE their events for real

run
boolean
default:false

Queue the simulation immediately after creating it

Response

Created. With run=true check data.state: queued = started; draft = it could not start and message states why (fix, then POST /{uuid}/run)