Phone Testing›Create Phone Scenario
Selenium Automation API
Automated Screenshots API
App Automation API (Real Devices)
Smart UI
Cypress Automation
User Management
Test Manager
HyperExecute
Accessibility Testing
Analytics
Performance Testing
Audit logs
Agent Testing API
- POSTGenerate Phone Scenarios
- GETGet Saved Phone Scenarios
- POSTCreate Phone Scenario
- PUTEdit Phone Scenario
- DELDelete Phone Scenarios
- POSTCreate Suite
- GETGet Suites By Project
- GETGet aggregated suite summary statistics
- POSTInitiate phone calls for scenarios
- POSTInitiate calls for a suite by name
- GETGet all call results for a suite
- GETGet detailed call result
- GETGet audio info for a call
- GETGet call results grouped by suite
Phone Testing
Create Phone Scenario
Create a new phone scenario manually. Credits are charged for the LLM usage.
POST
/api/projects/{project_id}/phone-scenarios/create
Create Phone Scenario
curl --request POST \--url "https://agent-testing.lambdatest.com/api/projects/{project_id}/phone-scenarios/create" \--header "Authorization: Basic <encoded-value>" \--header "Content-Type: application/json" \--data '{"scenario": "<scenario>","description": "<description>","persona": "<persona>","languages": []}'
{"success": true,"message": "<string>","created_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/jsonscenariostringrequired
The name or title of the scenario
descriptionstringrequired
A brief description of what the scenario is testing (generic, no hardcoded test data)
personastringrequired
The persona used in this scenario
languagesarray
Languages for the scenario (e.g. ['English', 'Hindi'])
Response
application/jsonSuccessful Response
successbooleanrequired
Whether the operation was successful
messagestringrequired
Response message
created_scenarioobjectrequired
The created scenario
created_scenario.scenario_idstring
Example:
"<string>"created_scenario.scenariostring
Example:
"<string>"created_scenario.promptstring
Example:
"<string>"created_scenario.descriptionstring
Example:
"<string>"created_scenario.personastring
Example:
""created_scenario.expected_outputstring[]
Example:
["Agent should greet {{caller_name}} appropriately"]
created_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"]
created_scenario.required_test_fieldsobject[]
created_scenario.optional_test_fieldsobject[]
created_scenario.test_profile_idstring
Example:
"<string>"created_scenario.agent_profile_idstring
Example:
"<string>"created_scenario.reservation_enabledboolean
Example:
falsecreated_scenario.max_duration_secondsnumber
created_scenario.silence_timeout_secondsnumber
created_scenario.needs_dtmfboolean
Example:
truecreated_scenario.dtmf_instructionsstring
Example:
"<string>"created_scenario.needs_human_transferboolean
Example:
truecreated_scenario.languagesstring[]
Example:
["<string>"]
created_scenario.ivr_workflowobject
created_scenario.vapi_enabled_tool_idsstring[]
Example:
["<string>"]
created_scenario.vapi_tool_stepsobject[]
Create Phone Scenario
curl --request POST \--url "https://agent-testing.lambdatest.com/api/projects/{project_id}/phone-scenarios/create" \--header "Authorization: Basic <encoded-value>" \--header "Content-Type: application/json" \--data '{"scenario": "<scenario>","description": "<description>","persona": "<persona>","languages": []}'
{"success": true,"message": "<string>","created_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": {}}]}}