List flows
List every flow on a branch, including each flow’s steps, step conditions, and transition functions.
GET
/
v1
/
agents
/
{agentId}
/
branches
/
{branchId}
/
flows
List flows
curl --request GET \
--url https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows', 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://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <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"
"net/http"
"io"
)
func main() {
url := "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "flow_8f2c1a7e",
"name": "Book a table",
"description": "Collects party size, date, and time, then checks availability and confirms the booking.",
"startStepId": "step_collect_details",
"steps": [
{
"id": "step_collect_details",
"type": "default_step",
"name": "Collect booking details",
"prompt": "Ask the caller for their party size, preferred date, and preferred time.",
"position": {
"x": 0,
"y": 0
},
"conditions": [
{
"id": "cond_details_collected",
"type": "stepCondition",
"label": "Details collected",
"description": "The caller has provided party size, date, and time.",
"childStepId": "step_check_availability",
"requiredEntities": [
"party_size",
"booking_date",
"booking_time"
]
}
],
"references": {
"entities": {
"party_size": true,
"booking_date": true,
"booking_time": true
}
}
},
{
"id": "step_check_availability",
"type": "function_step",
"name": "Check availability",
"position": {
"x": 0,
"y": 200
},
"conditions": [
{
"id": "cond_exit",
"type": "exitFlowCondition",
"label": "Booking complete"
}
],
"function": {
"id": "fn_check_availability",
"name": "check_availability",
"code": "def check_availability(conv: Conversation):\n return {\"available\": True}\n",
"latencyControl": {
"enabled": false
}
}
}
],
"transitionFunctions": [
{
"id": "tf_confirm_booking",
"name": "confirm_booking",
"description": "Confirms the booking once the caller agrees.",
"code": "def confirm_booking(conv: Conversation, party_size: int):\n return {\"confirmed\": True}\n",
"parameters": [
{
"id": "param_party_size",
"name": "party_size",
"type": "integer",
"description": "Number of guests in the booking."
}
],
"references": {
"flowSteps": {
"step_check_availability": true
}
}
}
]
}
]Authorizations
Last modified on November 4, 2026
Was this page helpful?
⌘I
List flows
curl --request GET \
--url https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows', 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://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <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"
"net/http"
"io"
)
func main() {
url := "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/flows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "flow_8f2c1a7e",
"name": "Book a table",
"description": "Collects party size, date, and time, then checks availability and confirms the booking.",
"startStepId": "step_collect_details",
"steps": [
{
"id": "step_collect_details",
"type": "default_step",
"name": "Collect booking details",
"prompt": "Ask the caller for their party size, preferred date, and preferred time.",
"position": {
"x": 0,
"y": 0
},
"conditions": [
{
"id": "cond_details_collected",
"type": "stepCondition",
"label": "Details collected",
"description": "The caller has provided party size, date, and time.",
"childStepId": "step_check_availability",
"requiredEntities": [
"party_size",
"booking_date",
"booking_time"
]
}
],
"references": {
"entities": {
"party_size": true,
"booking_date": true,
"booking_time": true
}
}
},
{
"id": "step_check_availability",
"type": "function_step",
"name": "Check availability",
"position": {
"x": 0,
"y": 200
},
"conditions": [
{
"id": "cond_exit",
"type": "exitFlowCondition",
"label": "Booking complete"
}
],
"function": {
"id": "fn_check_availability",
"name": "check_availability",
"code": "def check_availability(conv: Conversation):\n return {\"available\": True}\n",
"latencyControl": {
"enabled": false
}
}
}
],
"transitionFunctions": [
{
"id": "tf_confirm_booking",
"name": "confirm_booking",
"description": "Confirms the booking once the caller agrees.",
"code": "def confirm_booking(conv: Conversation, party_size: int):\n return {\"confirmed\": True}\n",
"parameters": [
{
"id": "param_party_size",
"name": "party_size",
"type": "integer",
"description": "Number of guests in the booking."
}
],
"references": {
"flowSteps": {
"step_check_availability": true
}
}
}
]
}
]
