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 TestingInitiate phone calls for scenarios
TestMu AI
StatusCommunityBlog
Phone Testing

Initiate phone calls for scenarios

Initiate phone calls for given scenarios.

POST
/api/initiatecall
Initiate phone calls for scenarios
curl --request POST \
--url "https://agent-testing.lambdatest.com/api/initiatecall" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: application/json" \
--data '{
"project_id": "<project_id>",
"scenario_ids": [],
"scenarios": [],
"suite_name": "<suite_name>",
"suite_id": "<suite_id>",
"test_profile_id": "<test_profile_id>",
"voice": "<voice>",
"vapi_auth_token": "<vapi_auth_token>",
"create_call": true,
"phone_number_id": "<phone_number_id>",
"customer_number": "<customer_number>",
"reuse_assistant": true,
"background_sound_enabled": true,
"background_sound_url": "<background_sound_url>",
"region": "<region>"
}'
{
"success": true,
"message": "<string>",
"data": {}
}

Authorizations

Authorizationstringheaderrequired

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

Body

application/json
project_idstringrequired

Project ID

scenario_idsarrayrequired

List of scenario IDs to initiate. Capped at 500 — the queue enforces an additional multiplicative cap on the expanded dispatch count (default 5000).

scenariosarray

Detailed scenario information including phone numbers

suite_namestring

Optional suite name

suite_idstring

Optional suite id to tag results with

test_profile_idstring

Test profile ID to use for injecting test data into scenarios at runtime. If not provided, the project's default test profile will be used (if available).

voiceobject

Voice configuration for the call (e.g., {"voiceId": "Neha"})

vapi_auth_tokenstring

VAPI auth token. If not provided, organization's configured token is used.

create_callboolean

If true and phone params provided, also create a call

phone_number_idstring

Calling-platform phone number ID to originate from (required if create_call is true)

customer_numberstring

Customer phone number with country code (required if create_call is true)

reuse_assistantboolean

If true, reuse previously stored assistant_id for a scenario_id when available

background_sound_enabledboolean

Enable background sound for the assistant

background_sound_urlstring

Background sound URL to include when enabled

regionstring

Inbound region override at the request level (e.g. 'us', 'eu'). Currently informational — the region is read from the persisted scenario / suite. Reserved for a future per-run one-time override.

Response

application/json

Calls dispatched (or enqueued for suite triggers). `data` carries the per-scenario `call_ids`; suite triggers additionally include `suite_run_id`, `total`, `started`, and `queued`.

successbooleanrequired
messagestringrequired
dataobjectrequired
Initiate phone calls for scenarios
curl --request POST \
--url "https://agent-testing.lambdatest.com/api/initiatecall" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: application/json" \
--data '{
"project_id": "<project_id>",
"scenario_ids": [],
"scenarios": [],
"suite_name": "<suite_name>",
"suite_id": "<suite_id>",
"test_profile_id": "<test_profile_id>",
"voice": "<voice>",
"vapi_auth_token": "<vapi_auth_token>",
"create_call": true,
"phone_number_id": "<phone_number_id>",
"customer_number": "<customer_number>",
"reuse_assistant": true,
"background_sound_enabled": true,
"background_sound_url": "<background_sound_url>",
"region": "<region>"
}'
{
"success": true,
"message": "<string>",
"data": {}
}