For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content
Voice TestingCreate a voice scenario
TestMu AI
StatusCommunityBlog
Voice Testing

Create a voice scenario

Create a single voice scenario manually.

POST
/api/projects/{project_id}/voice-scenarios/create
Create a voice scenario
curl --request POST \
--url "https://agent-testing.lambdatest.com/api/projects/{project_id}/voice-scenarios/create" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: application/json" \
--data '{
"title": "Order status lookup",
"description": "Caller wants to check the status of an existing order and asks for the expected delivery date.",
"persona": "Brief and Direct",
"expected_output": [
"Agent greets the caller professionally",
"Agent asks for the order number",
"Agent provides the order status and delivery date"
],
"category": "task_completion",
"max_turns": 15,
"first_speaker": "simulator",
"max_duration_seconds": 300
}'
{
"success": true,
"scenario": {
"id": "<string>",
"title": "<string>",
"description": "<string>",
"persona": "<string>",
"category": "task_completion",
"expected_output": [
"<string>"
],
"max_turns": 123,
"first_speaker": "<string>",
"max_duration_seconds": 123,
"prompt_version_id": "<string>",
"sync_status": "<string>"
}
}

Authorizations

Authorizationstringheaderrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

project_idstringrequired

Body

application/json
titlestring

Short scenario title

descriptionstring

Detailed prose description of the test scenario

personastring

Caller persona name

expected_outputarray

Validation criteria checked after the call

categorystring

greeting | task_completion | error_recovery | multi_turn | hold_transfer

max_turnsinteger

Max conversation turns

first_speakerstring

simulator | agent

max_duration_secondsinteger

Max call duration in seconds

Response

application/json

The created scenario (saved by default).

successbooleanrequired
scenarioobjectrequired

The created/updated scenario

scenario.idstring
Example: "<string>"
scenario.titlestring
Example: "<string>"
scenario.descriptionstring
Example: "<string>"
scenario.personastring
Example: "<string>"
scenario.categorystring
Example: "task_completion"
scenario.expected_outputstring[]
Example:
["<string>"]
scenario.max_turnsnumber
scenario.first_speakerstring
Example: "<string>"
scenario.max_duration_secondsnumber
scenario.prompt_version_idstring
Example: "<string>"
scenario.sync_statusstring
Example: "<string>"
Create a voice scenario
curl --request POST \
--url "https://agent-testing.lambdatest.com/api/projects/{project_id}/voice-scenarios/create" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: application/json" \
--data '{
"title": "Order status lookup",
"description": "Caller wants to check the status of an existing order and asks for the expected delivery date.",
"persona": "Brief and Direct",
"expected_output": [
"Agent greets the caller professionally",
"Agent asks for the order number",
"Agent provides the order status and delivery date"
],
"category": "task_completion",
"max_turns": 15,
"first_speaker": "simulator",
"max_duration_seconds": 300
}'
{
"success": true,
"scenario": {
"id": "<string>",
"title": "<string>",
"description": "<string>",
"persona": "<string>",
"category": "task_completion",
"expected_output": [
"<string>"
],
"max_turns": 123,
"first_speaker": "<string>",
"max_duration_seconds": 123,
"prompt_version_id": "<string>",
"sync_status": "<string>"
}
}