Initiate Call By Workflow Uuid
curl --request POST \
--url https://app.bananaflow.ai/api/v1/public/agent/workflow/{workflow_uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"phone_number": "<string>",
"initial_context": {},
"telephony_configuration_id": 123,
"from_phone_number_id": 123,
"max_wait_seconds": 1,
"dial_by": "2023-11-07T05:31:56Z",
"status_url": "<string>"
}
'import requests
url = "https://app.bananaflow.ai/api/v1/public/agent/workflow/{workflow_uuid}"
payload = {
"phone_number": "<string>",
"initial_context": {},
"telephony_configuration_id": 123,
"from_phone_number_id": 123,
"max_wait_seconds": 1,
"dial_by": "2023-11-07T05:31:56Z",
"status_url": "<string>"
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone_number: '<string>',
initial_context: {},
telephony_configuration_id: 123,
from_phone_number_id: 123,
max_wait_seconds: 1,
dial_by: '2023-11-07T05:31:56Z',
status_url: '<string>'
})
};
fetch('https://app.bananaflow.ai/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://app.bananaflow.ai/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,
'from_phone_number_id' => 123,
'max_wait_seconds' => 1,
'dial_by' => '2023-11-07T05:31:56Z',
'status_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$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://app.bananaflow.ai/api/v1/public/agent/workflow/{workflow_uuid}"
payload := strings.NewReader("{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123,\n \"from_phone_number_id\": 123,\n \"max_wait_seconds\": 1,\n \"dial_by\": \"2023-11-07T05:31:56Z\",\n \"status_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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://app.bananaflow.ai/api/v1/public/agent/workflow/{workflow_uuid}")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123,\n \"from_phone_number_id\": 123,\n \"max_wait_seconds\": 1,\n \"dial_by\": \"2023-11-07T05:31:56Z\",\n \"status_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.bananaflow.ai/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["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123,\n \"from_phone_number_id\": 123,\n \"max_wait_seconds\": 1,\n \"dial_by\": \"2023-11-07T05:31:56Z\",\n \"status_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"workflow_run_id": 123,
"workflow_run_name": "<string>",
"deadline": "2023-11-07T05:31:56Z"
}{
"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}
Initiate Call By Workflow Uuid
curl --request POST \
--url https://app.bananaflow.ai/api/v1/public/agent/workflow/{workflow_uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"phone_number": "<string>",
"initial_context": {},
"telephony_configuration_id": 123,
"from_phone_number_id": 123,
"max_wait_seconds": 1,
"dial_by": "2023-11-07T05:31:56Z",
"status_url": "<string>"
}
'import requests
url = "https://app.bananaflow.ai/api/v1/public/agent/workflow/{workflow_uuid}"
payload = {
"phone_number": "<string>",
"initial_context": {},
"telephony_configuration_id": 123,
"from_phone_number_id": 123,
"max_wait_seconds": 1,
"dial_by": "2023-11-07T05:31:56Z",
"status_url": "<string>"
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone_number: '<string>',
initial_context: {},
telephony_configuration_id: 123,
from_phone_number_id: 123,
max_wait_seconds: 1,
dial_by: '2023-11-07T05:31:56Z',
status_url: '<string>'
})
};
fetch('https://app.bananaflow.ai/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://app.bananaflow.ai/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,
'from_phone_number_id' => 123,
'max_wait_seconds' => 1,
'dial_by' => '2023-11-07T05:31:56Z',
'status_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$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://app.bananaflow.ai/api/v1/public/agent/workflow/{workflow_uuid}"
payload := strings.NewReader("{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123,\n \"from_phone_number_id\": 123,\n \"max_wait_seconds\": 1,\n \"dial_by\": \"2023-11-07T05:31:56Z\",\n \"status_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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://app.bananaflow.ai/api/v1/public/agent/workflow/{workflow_uuid}")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123,\n \"from_phone_number_id\": 123,\n \"max_wait_seconds\": 1,\n \"dial_by\": \"2023-11-07T05:31:56Z\",\n \"status_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.bananaflow.ai/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["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"<string>\",\n \"initial_context\": {},\n \"telephony_configuration_id\": 123,\n \"from_phone_number_id\": 123,\n \"max_wait_seconds\": 1,\n \"dial_by\": \"2023-11-07T05:31:56Z\",\n \"status_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"workflow_run_id": 123,
"workflow_run_name": "<string>",
"deadline": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}What changed (2026-11-03). A call request is now queued, and the answer is
200 with status queued, the call’s workflow_run_id, its workflow_run_name and a deadline. The call goes out as soon as one of your account’s lines is free. When every line is in use you no longer get 429: the request is queued like any other. An account with no lines gets each of its calls queued, then expired. If your code retried on 429, stop retrying: pass a status_url and read the call’s statuses there. See Call statuses.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 status_url (https) to receive each status change of the call, max_wait_seconds to wait less than your account allows, dial_by for the latest time the call may be dialled, and an Idempotency-Key header so a retried request never places a second call. See API Trigger.
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 Telephony configurations (https://app.bananaflow.ai/telephony-configurations).
Pass from_phone_number_id to use a specific active caller ID in the resolved telephony configuration. The number ID must belong to that configuration. Retrieve number IDs with List 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.
Body
application/json
Request model for triggering a call via API
Response
Successful Response
The answer to an accepted call request.
A new request is queued, or expired when it arrived outside the account's
calling hours. A repeat of an earlier request (same Idempotency-Key) gets the
first call and the status it has now. status takes the wire values of
CallNowStatus. workflow_run_id is the call ID, and deadline is the time
by which the call must be dialled, after which it ends expired.
Was this page helpful?