Place a draft test call
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/telephony/initiate-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow_id": 123,
"from_phone_number_id": 123,
"phone_number": "<string>",
"telephony_configuration_id": 123,
"workflow_run_id": 123
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/telephony/initiate-call"
payload = {
"workflow_id": 123,
"from_phone_number_id": 123,
"phone_number": "<string>",
"telephony_configuration_id": 123,
"workflow_run_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflow_id: 123,
from_phone_number_id: 123,
phone_number: '<string>',
telephony_configuration_id: 123,
workflow_run_id: 123
})
};
fetch('https://agents.labs.bandwidth.com/api/v1/telephony/initiate-call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Calls
Place a draft test call
Call a phone number using an agent draft and selected telephony connection.
POST
/
api
/
v1
/
telephony
/
initiate-call
Place a draft test call
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/telephony/initiate-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow_id": 123,
"from_phone_number_id": 123,
"phone_number": "<string>",
"telephony_configuration_id": 123,
"workflow_run_id": 123
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/telephony/initiate-call"
payload = {
"workflow_id": 123,
"from_phone_number_id": 123,
"phone_number": "<string>",
"telephony_configuration_id": 123,
"workflow_run_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflow_id: 123,
from_phone_number_id: 123,
phone_number: '<string>',
telephony_configuration_id: 123,
workflow_run_id: 123
})
};
fetch('https://agents.labs.bandwidth.com/api/v1/telephony/initiate-call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Requires a Labs
super_user OAuth bearer token plus Editor, Admin, or Owner. Send numeric workflow_id and a destination phone_number, or use the saved test number. Optionally select a workspace telephony configuration and caller number.
This places a real call and can incur charges. Missing telephony configuration returns 400, unknown agent 404, missing execution owner 409, and insufficient quota 402. The response contains a confirmation message with the run name; it does not return a numeric run ID. Use run listings to inspect the call. Acceptance is not proof the recipient answered.Authorizations
Bandwidth Labs OAuth access token. Uses the user's selected workspace; the workspace header is not required. Do not also send an API key. Bearer-only operations may additionally require the Labs super_user role.
Body
application/json
Response
Successful Response