Skip to main content
POST
Run Saved Scenarios

Authorizations

Authorization
string
header
required

Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.

Path Parameters

agent_id
integer
required

Tuner's internal numeric ID for the agent.

workspace_id
integer
required

Workspace ID. Find this in Workspace > General Settings.

Body

application/json

Request to start a run that places test calls against scenarios picked from the library.

caller_persona_id
integer
required

ID of the caller persona (language and accent) the simulated caller uses. Get valid IDs from List Caller Personas.

Example:

1

selected_scenario_ids
integer[]
required

IDs of the library scenarios to run, 1 to 20, in the order they are queued. Duplicates are rejected.

Required array length: 1 - 20 elements
Example:
max_call_duration_minutes
integer
default:3

Maximum length of each simulated call, in minutes (1-12). Defaults to 3.

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

3

simulation_profile_id
integer | null

ID of a simulation profile belonging to this agent. Its fields are given to the simulated caller as facts about themselves. Optional.

Required range: x > 0
Example:

12

noise_environment_id
integer | null

ID of a background-noise environment to mix into the call. Get valid IDs from List Noise Environments. Must be sent together with noise_intensity.

Required range: x > 0
Example:

2

noise_intensity
number | null

Gain applied to the background noise: 0.5, 1.0 or 1.5. Must be sent together with noise_environment_id.

Example:

1

Response

Successful Response

The simulation run that was just started.

simulation_run_id
integer
required

ID of the new simulation run.

generated_count
integer
required

Number of test scenarios created so far. 0 for Run AI-Generated Scenarios, because generation is asynchronous; the full count for replay runs and runs from saved scenarios.

success
boolean
required

Whether the run was accepted.

caller_persona_id
integer | null

ID of the caller persona used. Null for replay runs.

caller_persona
CallerPersonaResponse · object | null

The caller persona used. Null for replay runs.

simulation_profile_id
integer | null

ID of the simulation profile used, if one was given.

simulation_profile_name
string | null

Name of the simulation profile used, if one was given.

simulation_profile_snapshot
Simulation Profile Snapshot · object | null

Copy of the profile's fields as they were when the run started.

noise_environment_id
integer | null

ID of the background-noise environment used, if one was given.

noise_intensity
number | null

Gain applied to the background noise, if noise was used.

noise_environment
NoiseEnvironmentResponse · object | null

The background-noise environment used, if one was given.