Test a call by trigger
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/public/agent/test/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "<string>",
"initial_context": {},
"telephony_configuration_id": 123
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/public/agent/test/{uuid}"
payload = {
"phone_number": "<string>",
"initial_context": {},
"telephony_configuration_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({phone_number: '<string>', initial_context: {}, telephony_configuration_id: 123})
};
fetch('https://agents.labs.bandwidth.com/api/v1/public/agent/test/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "<string>",
"workflow_run_id": 123,
"workflow_run_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Calls
Test a call by trigger
Place a test call using an API trigger identifier.
POST
/
api
/
v1
/
public
/
agent
/
test
/
{uuid}
Test a call by trigger
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/public/agent/test/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "<string>",
"initial_context": {},
"telephony_configuration_id": 123
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/public/agent/test/{uuid}"
payload = {
"phone_number": "<string>",
"initial_context": {},
"telephony_configuration_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({phone_number: '<string>', initial_context: {}, telephony_configuration_id: 123})
};
fetch('https://agents.labs.bandwidth.com/api/v1/public/agent/test/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "<string>",
"workflow_run_id": 123,
"workflow_run_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Requires a Labs
super_user OAuth bearer token plus Editor, Admin, or Owner. This is a real phone call that can incur usage. The path is the trigger UUID, not the numeric agent ID. Supply the request fields shown below; confirm the destination and provider configuration before sending. Test calls use the draft path; production calls use the published path.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.
Path Parameters
Body
application/json