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
Phone TestingEdit Phone Scenario
TestMu AI
StatusCommunityBlog
Phone Testing

Edit Phone Scenario

Edit an existing phone scenario.

PUT
/api/projects/{project_id}/phone-scenarios/edit
Edit Phone Scenario
curl --request PUT \
--url "https://agent-testing.lambdatest.com/api/projects/{project_id}/phone-scenarios/edit" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: application/json" \
--data '{
"scenario_id": "<scenario_id>",
"scenario": "<scenario>",
"description": "<description>",
"persona": "<persona>",
"expected_output": [],
"first_speaker": "<first_speaker>",
"test_profile_id": "<test_profile_id>",
"reservation_enabled": true,
"agent_profile_id": "<agent_profile_id>",
"max_duration_seconds": 0,
"silence_timeout_seconds": 0,
"needs_dtmf": true,
"dtmf_instructions": "<dtmf_instructions>",
"needs_human_transfer": true,
"region": "<region>",
"vapi_enabled_tool_ids": [],
"vapi_tool_steps": []
}'
{
"success": true,
"message": "<string>",
"updated_scenario": {
"scenario_id": "<string>",
"scenario": "<string>",
"prompt": "<string>",
"description": "<string>",
"persona": "",
"expected_output": [
"Agent should greet {{caller_name}} appropriately"
],
"success_criteria": [
"Agent should greet {{caller_name}} appropriately",
"Agent must verify {{account_id}} before disclosing balance",
"When asked for phone, agent should confirm {{phone_number}} matches records"
],
"required_test_fields": [
{
"field": "<string>",
"type": "string",
"purpose": ""
}
],
"optional_test_fields": [
{
"field": "<string>",
"type": "string",
"purpose": ""
}
],
"test_profile_id": "<string>",
"agent_profile_id": "<string>",
"reservation_enabled": false,
"max_duration_seconds": 123,
"silence_timeout_seconds": 123,
"needs_dtmf": true,
"dtmf_instructions": "<string>",
"needs_human_transfer": true,
"languages": [
"<string>"
],
"ivr_workflow": {},
"vapi_enabled_tool_ids": [
"<string>"
],
"vapi_tool_steps": [
{
"tool_id": "<string>",
"tool_name": "<string>",
"tool_type": "<string>",
"tool_description": "<string>",
"required": true,
"instruction": "<string>",
"expected_arguments": {}
}
]
}
}

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
scenario_idstringrequired

The ID of the scenario to edit

scenariostring

The name or title of the scenario

descriptionstring

A brief description of what the scenario is testing (generic, no hardcoded test data)

personastring

The persona used in this scenario

expected_outputarray

List of expected outcomes/validation criteria with {placeholders} for test data

first_speakerstring

The first speaker in the scenario

test_profile_idstring

Optional test profile ID to associate with this scenario

reservation_enabledboolean

Whether this scenario reserves a dedicated phone number

agent_profile_idstring

Optional agent profile ID to associate with this scenario

max_duration_secondsinteger

Maximum call duration in seconds (60-3600). Defaults to 500 if not set.

silence_timeout_secondsinteger

Whole-call silence cap in seconds (30-180). The call is ended if neither party speaks for this long. Defaults to 30s if not set.

needs_dtmfboolean

Whether this scenario requires DTMF tool for IVR navigation

dtmf_instructionsstring

User-provided IVR navigation instructions injected verbatim into the prompt

needs_human_transferboolean

Enable for scenarios where the agent under test transfers the call to a human. The simulator waits silently for the human to pick up and continues the conversation with them, instead of ending the call on the transfer.

regionstring

Inbound region override for this scenario (e.g. 'us', 'eu'). Null clears the override and inherits the suite-level region.

vapi_enabled_tool_idsarray

VAPI assistant tool IDs enabled for this scenario.

vapi_tool_stepsarray

Scenario instructions for triggering the selected VAPI tools of the agent under test.

Response

application/json

Successful Response

successbooleanrequired

Whether the operation was successful

messagestringrequired

Response message

updated_scenarioobjectrequired

The updated scenario

updated_scenario.scenario_idstring
Example: "<string>"
updated_scenario.scenariostring
Example: "<string>"
updated_scenario.promptstring
Example: "<string>"
updated_scenario.descriptionstring
Example: "<string>"
updated_scenario.personastring
Example: ""
updated_scenario.expected_outputstring[]
Example:
["Agent should greet {{caller_name}} appropriately"]
updated_scenario.success_criteriastring[]
Example:
["Agent should greet {{caller_name}} appropriately","Agent must verify {{account_id}} before disclosing balance","When asked for phone, agent should confirm {{phone_number}} matches records"]
updated_scenario.required_test_fieldsobject[]
updated_scenario.optional_test_fieldsobject[]
updated_scenario.test_profile_idstring
Example: "<string>"
updated_scenario.agent_profile_idstring
Example: "<string>"
updated_scenario.reservation_enabledboolean
Example: false
updated_scenario.max_duration_secondsnumber
updated_scenario.silence_timeout_secondsnumber
updated_scenario.needs_dtmfboolean
Example: true
updated_scenario.dtmf_instructionsstring
Example: "<string>"
updated_scenario.needs_human_transferboolean
Example: true
updated_scenario.languagesstring[]
Example:
["<string>"]
updated_scenario.ivr_workflowobject
updated_scenario.vapi_enabled_tool_idsstring[]
Example:
["<string>"]
updated_scenario.vapi_tool_stepsobject[]
Edit Phone Scenario
curl --request PUT \
--url "https://agent-testing.lambdatest.com/api/projects/{project_id}/phone-scenarios/edit" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: application/json" \
--data '{
"scenario_id": "<scenario_id>",
"scenario": "<scenario>",
"description": "<description>",
"persona": "<persona>",
"expected_output": [],
"first_speaker": "<first_speaker>",
"test_profile_id": "<test_profile_id>",
"reservation_enabled": true,
"agent_profile_id": "<agent_profile_id>",
"max_duration_seconds": 0,
"silence_timeout_seconds": 0,
"needs_dtmf": true,
"dtmf_instructions": "<dtmf_instructions>",
"needs_human_transfer": true,
"region": "<region>",
"vapi_enabled_tool_ids": [],
"vapi_tool_steps": []
}'
{
"success": true,
"message": "<string>",
"updated_scenario": {
"scenario_id": "<string>",
"scenario": "<string>",
"prompt": "<string>",
"description": "<string>",
"persona": "",
"expected_output": [
"Agent should greet {{caller_name}} appropriately"
],
"success_criteria": [
"Agent should greet {{caller_name}} appropriately",
"Agent must verify {{account_id}} before disclosing balance",
"When asked for phone, agent should confirm {{phone_number}} matches records"
],
"required_test_fields": [
{
"field": "<string>",
"type": "string",
"purpose": ""
}
],
"optional_test_fields": [
{
"field": "<string>",
"type": "string",
"purpose": ""
}
],
"test_profile_id": "<string>",
"agent_profile_id": "<string>",
"reservation_enabled": false,
"max_duration_seconds": 123,
"silence_timeout_seconds": 123,
"needs_dtmf": true,
"dtmf_instructions": "<string>",
"needs_human_transfer": true,
"languages": [
"<string>"
],
"ivr_workflow": {},
"vapi_enabled_tool_ids": [
"<string>"
],
"vapi_tool_steps": [
{
"tool_id": "<string>",
"tool_name": "<string>",
"tool_type": "<string>",
"tool_description": "<string>",
"required": true,
"instruction": "<string>",
"expected_arguments": {}
}
]
}
}