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.

Headers

X-Tuner-Client
string | null

Client making the request, <client>/<semver> (e.g. cli/0.1.0).

Path Parameters

agent_id
string
required

Tuner's numeric agent ID, or your Agent ID from Agent Settings > Agent Connection. Digits-only values are read as the numeric ID.

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.

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

caller_persona_id
integer | null

ID of the caller persona (language and accent) the simulated caller uses. Get valid IDs from List Caller Personas. When neither this nor language is sent, the agent's language picks the persona (English (American) by default).

Example:

1

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

selected_scenario_ids
integer[] | null

IDs of the library scenarios to run, 1 to 20, in the order they are queued. Duplicates are rejected. Send exactly one of selected_scenario_ids and tag.

Minimum array length: 1
Example:
tag
string | null

Run every active library scenario of this agent whose tags include this exact, case-sensitive value, in ascending scenario ID order. Send exactly one of selected_scenario_ids and tag.

Minimum string length: 1
Example:

"smoke"

language
string | null

Caller persona by code (en-US, case-insensitive) or exact name. Use instead of caller_persona_id.

Minimum string length: 1
Example:

"en-US"

profile
string | null

Simulation profile of this agent by exact name. Use instead of simulation_profile_id.

Minimum string length: 1
Example:

"Returning customer"

noise
string | null

Background-noise environment by slug. Use instead of noise_environment_id. noise_intensity defaults to 1.0.

Minimum string length: 1
Example:

"cafe"

metadata
Metadata · object | null

Reserved. Stored with the run as sent; not returned.

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.