List Call Flows
curl --request GET \
--url https://api.trillet.ai/v1/api/call-flows \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v1/api/call-flows"
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api.trillet.ai/v1/api/call-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.trillet.ai/v1/api/call-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>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.trillet.ai/v1/api/call-flows"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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.trillet.ai/v1/api/call-flows")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/call-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>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body[
{
"_id": "flowId1",
"workspaceId": "workspaceIdExample1",
"name": "Customer Support Flow",
"direction": "inbound",
"agent": "agentIdExample1",
"isActive": true,
"promptType": "simple",
"createdAt": "2025-01-02T09:00:00Z",
"updatedAt": "2025-01-02T09:30:00Z"
},
{
"_id": "flowId2",
"workspaceId": "workspaceIdExample2",
"name": "Sales Inquiry Flow",
"direction": "bidirectional",
"agent": "agentIdExample2",
"isActive": false,
"promptType": "flow",
"createdAt": "2025-01-05T09:00:00Z",
"updatedAt": "2025-01-06T12:00:00Z"
}
]
Call Flows
List Call Flows
Retrieve a list of all call flows in the workspace.
GET
/
v1
/
api
/
call-flows
List Call Flows
curl --request GET \
--url https://api.trillet.ai/v1/api/call-flows \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v1/api/call-flows"
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api.trillet.ai/v1/api/call-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.trillet.ai/v1/api/call-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>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.trillet.ai/v1/api/call-flows"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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.trillet.ai/v1/api/call-flows")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/call-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>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body[
{
"_id": "flowId1",
"workspaceId": "workspaceIdExample1",
"name": "Customer Support Flow",
"direction": "inbound",
"agent": "agentIdExample1",
"isActive": true,
"promptType": "simple",
"createdAt": "2025-01-02T09:00:00Z",
"updatedAt": "2025-01-02T09:30:00Z"
},
{
"_id": "flowId2",
"workspaceId": "workspaceIdExample2",
"name": "Sales Inquiry Flow",
"direction": "bidirectional",
"agent": "agentIdExample2",
"isActive": false,
"promptType": "flow",
"createdAt": "2025-01-05T09:00:00Z",
"updatedAt": "2025-01-06T12:00:00Z"
}
]
Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Response Fields
Each object in the response array represents a call flow within the workspace, containing the following fields:string
The unique identifier for the call flow.
string
The identifier of the workspace where the call flow is configured.
string
The name assigned to the call flow.
string
Indicates the direction of the call flow, such as “inbound” or “bidirectional”.
string
The identifier of the agent associated with the call flow.
boolean
A boolean indicating whether the call flow is currently active.
string
The type of prompt used in the call flow, either “simple” or “flow”.
string
Timestamp when the call flow was updated.
string
Timestamp when the call flow was last updated.
[
{
"_id": "flowId1",
"workspaceId": "workspaceIdExample1",
"name": "Customer Support Flow",
"direction": "inbound",
"agent": "agentIdExample1",
"isActive": true,
"promptType": "simple",
"createdAt": "2025-01-02T09:00:00Z",
"updatedAt": "2025-01-02T09:30:00Z"
},
{
"_id": "flowId2",
"workspaceId": "workspaceIdExample2",
"name": "Sales Inquiry Flow",
"direction": "bidirectional",
"agent": "agentIdExample2",
"isActive": false,
"promptType": "flow",
"createdAt": "2025-01-05T09:00:00Z",
"updatedAt": "2025-01-06T12:00:00Z"
}
]
⌘I
