JavaScript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const conversationFlowComponents = await client.conversationFlowComponent.list();
console.log(conversationFlowComponents.has_more);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
conversation_flow_components = client.conversation_flow_component.list()
print(conversation_flow_components.has_more)curl --request GET \
--url https://api.retellai.com/v2/list-conversation-flow-components \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/v2/list-conversation-flow-components",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.retellai.com/v2/list-conversation-flow-components"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.retellai.com/v2/list-conversation-flow-components")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/v2/list-conversation-flow-components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"pagination_key": "<string>",
"has_more": true,
"items": [
{
"name": "Customer Information Collector",
"nodes": [
{
"id": "collect_info",
"type": "conversation",
"instruction": {
"type": "prompt",
"text": "Ask the customer for their name and contact information."
}
}
],
"conversation_flow_component_id": "<string>",
"user_modified_timestamp": 123,
"flex_mode": false,
"tools": [
{
"type": "custom",
"name": "get_customer_info",
"description": "Get customer information from database",
"tool_id": "tool_001",
"url": "https://api.example.com/customer",
"method": "GET"
}
],
"mcps": [
{
"name": "<string>",
"url": "<string>",
"headers": {
"Authorization": "Bearer 1234567890"
},
"query_params": {
"index": "1",
"key": "value"
},
"timeout_ms": 123
}
],
"start_node_id": "collect_info",
"begin_tag_display_position": {
"x": 100,
"y": 200
},
"notes": [
{
"id": "note_abc123",
"content": "Remember to handle edge cases here.",
"display_position": {
"x": 300,
"y": 150
},
"size": {
"width": 200,
"height": 100
}
}
],
"linked_conversation_flow_ids": [
"<string>"
]
}
]
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "The requested resource was not found."
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Conversation Flow Components
List Conversation Flow Components
List shared conversation flow components with pagination
GET
/
v2
/
list-conversation-flow-components
JavaScript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const conversationFlowComponents = await client.conversationFlowComponent.list();
console.log(conversationFlowComponents.has_more);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
conversation_flow_components = client.conversation_flow_component.list()
print(conversation_flow_components.has_more)curl --request GET \
--url https://api.retellai.com/v2/list-conversation-flow-components \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/v2/list-conversation-flow-components",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.retellai.com/v2/list-conversation-flow-components"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.retellai.com/v2/list-conversation-flow-components")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/v2/list-conversation-flow-components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"pagination_key": "<string>",
"has_more": true,
"items": [
{
"name": "Customer Information Collector",
"nodes": [
{
"id": "collect_info",
"type": "conversation",
"instruction": {
"type": "prompt",
"text": "Ask the customer for their name and contact information."
}
}
],
"conversation_flow_component_id": "<string>",
"user_modified_timestamp": 123,
"flex_mode": false,
"tools": [
{
"type": "custom",
"name": "get_customer_info",
"description": "Get customer information from database",
"tool_id": "tool_001",
"url": "https://api.example.com/customer",
"method": "GET"
}
],
"mcps": [
{
"name": "<string>",
"url": "<string>",
"headers": {
"Authorization": "Bearer 1234567890"
},
"query_params": {
"index": "1",
"key": "value"
},
"timeout_ms": 123
}
],
"start_node_id": "collect_info",
"begin_tag_display_position": {
"x": 100,
"y": 200
},
"notes": [
{
"id": "note_abc123",
"content": "Remember to handle edge cases here.",
"display_position": {
"x": 300,
"y": 150
},
"size": {
"width": 200,
"height": 100
}
}
],
"linked_conversation_flow_ids": [
"<string>"
]
}
]
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "The requested resource was not found."
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Query Parameters
Maximum number of items to return.
Required range:
x <= 1000Sort order for results.
Available options:
ascending, descending Pagination key for fetching the next page.
Was this page helpful?
⌘I

