Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Input for creating a new simulation run plan

name
string
required

Name of the run plan

Minimum string length: 1
Example:

"My Run Plan"

direction
enum<string>
required

Direction of the simulation (INBOUND or OUTBOUND)

Available options:
INBOUND,
OUTBOUND
Example:

"INBOUND"

maxSimulationDurationSeconds
integer
required

Maximum duration in seconds for each simulation

Required range: x >= 1
Example:

300

agentEndpoints
object[]
required

Agent endpoints to include in this run plan

Minimum array length: 1
metrics
object[]
required

Metric definitions to include in this run plan. Reference each by id (UUID) or slug.

Minimum array length: 1
description
string

Description of the run plan

Example:

"A run plan for testing inbound calls"

iterationCount
integer
default:1

Number of iterations to run for each test case (1-10000)

Required range: 1 <= x <= 10000
Example:

1

maxConcurrentJobs
integer
default:5

Maximum number of concurrent simulation jobs

Required range: x >= 1
Example:

5

silenceTimeoutSeconds
integer
default:30

Timeout in seconds for silence detection

Required range: x >= 1
Example:

30

endCallPhrases
string[]

Phrases that trigger end of call. Empty array disables the feature.

Example:
endCallReasons
string[]

Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.

Example:
executionMode
enum<string>
default:PARALLEL

Execution mode (PARALLEL or SEQUENTIAL)

Available options:
PARALLEL,
SEQUENTIAL_SAME_RUN_PLAN,
SEQUENTIAL_PROJECT
Example:

"PARALLEL"

scenarios
object[]
deprecated

Deprecated: use flows instead. Scenarios to include in this run plan. The same scenario ID can appear multiple times with different variables.

Minimum array length: 1
flows
object[]

Customer flows to include in this run plan. The same flow can appear more than once with a different persona override or different variables.

Minimum array length: 1
personas
object[]

Personas to include in this run plan. Required with scenarios; ignored with flows, where each variant carries its own persona.

Minimum array length: 1
autoRun
boolean
default:false
deprecated

Deprecated: use POST /v1/simulation/run, which starts a run and accepts runtime variables as well. This flag runs the plan with only the values pinned on it.

Example:

false

Response

The created run plan

data
object
required

Response when creating a run plan, optionally including a triggered job