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 TestingCreate Phone Scenario
TestMu AI
StatusCommunityBlog
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/json
scenariostringrequired

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/json

Successful 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: false
created_scenario.max_duration_secondsnumber
created_scenario.silence_timeout_secondsnumber
created_scenario.needs_dtmfboolean
Example: true
created_scenario.dtmf_instructionsstring
Example: "<string>"
created_scenario.needs_human_transferboolean
Example: true
created_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": {}
}
]
}
}