v50

latestOpenAPI 3.1.0raw.githubusercontent.com2026-04-285553225.5 KB
Simulation Run Plan

Create a run plan

Creates a new simulation run plan. Optionally triggers a job immediately if autoRun is true.

post/v1/simulation/plan

Request body

namestring required

Name of the run plan

descriptionstring

Description of the run plan

direction'INBOUND' | 'OUTBOUND' required

Direction of the simulation (INBOUND or OUTBOUND)

iterationCountinteger

Number of iterations to run for each test case. Must be 1 for OUTBOUND direction.

maxConcurrentJobsinteger

Maximum number of concurrent simulation jobs

maxSimulationDurationSecondsinteger required

Maximum duration in seconds for each simulation

silenceTimeoutSecondsinteger

Timeout in seconds for silence detection

endCallPhrasesstring[]

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

endCallReasonsstring[]

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

executionMode'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT'

Execution mode (PARALLEL or SEQUENTIAL)

autoRunboolean

Whether to automatically trigger a job after creating the run plan

Example request

{
  "name": "My Run Plan",
  "description": "A run plan for testing inbound calls",
  "direction": "INBOUND",
  "iterationCount": 1,
  "maxConcurrentJobs": 5,
  "maxSimulationDurationSeconds": 300,
  "silenceTimeoutSeconds": 30,
  "endCallPhrases": [
    "goodbye"
  ],
  "endCallReasons": [
    "Order has been confirmed by the agent"
  ],
  "executionMode": "PARALLEL",
  "scenarios": [
    {
      "variables": {
        "customerName": "John Doe",
        "appointmentDate": "2024-02-15"
      }
    }
  ]
}

Response

The created run plan

Example response

{
  "data": {
    "runPlan": {
      "scenarios": [
        {
          "variables": {
            "customerName": "John Doe",
            "appointmentDate": "2024-02-15"
          }
        }
      ]
    },
    "runPlanJob": {
      "simulationRunPlanId": "9a8b7c6d-5e4f-3210-abcd-ef9876543210",
      "simulationRunPlanJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
      "status": "PENDING",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  }
}