Trigger an Outbound Agent Run by Agent UUID
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_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/workflow/{workflow_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/workflow/{workflow_uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phone_number' => '<string>',
'initial_context' => [
],
'telephony_configuration_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_uuid}"
payload := strings.NewReader("{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"workflow_run_id": 123,
"workflow_run_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Runs
Trigger an Outbound Agent Run by Agent UUID
Start an outbound agent run using a workflow’s stable Agent UUID
POST
/
api
/
v1
/
public
/
agent
/
workflow
/
{workflow_uuid}
Trigger an Outbound Agent Run by Agent UUID
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_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/workflow/{workflow_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/workflow/{workflow_uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phone_number' => '<string>',
'initial_context' => [
],
'telephony_configuration_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_uuid}"
payload := strings.NewReader("{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents.labs.bandwidth.com/api/v1/public/agent/workflow/{workflow_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"workflow_run_id": 123,
"workflow_run_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Outbound calling is temporarily disabled. Use the browser tester or incoming calls to test your agent. The reference below does not enable outbound calling.
super_user and at least Editor access to the selected workspace. API keys are not accepted for this endpoint. See authentication.
Use this endpoint when you want to start an agent run directly by its stable Agent UUID instead of through an API Trigger node.
The workflow_uuid is the workflow’s Agent UUID. It is different from an API Trigger node’s trigger_path.
To find and copy the Agent UUID in the UI, see Agent UUID.
Use workflow_run_id from the response to later retrieve run details, recordings, and transcripts.
Pass initial_context to inject runtime data as template variables into the agent’s prompt. See Using initial context.
Pass telephony_configuration_id to route the call through a specific telephony configuration instead of your organization’s default. The id is shown on each row in Phone numbers.
This route expects a workflow UUID. Do not pass an API Trigger node UUID here. If you want to execute via an API Trigger node, use Trigger an outbound agent run instead.
Your telephony provider must be configured before outbound calls will connect. See Telephony for setup instructions.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json