Get an agent's conversation flow
curl --request GET \
--url https://app.pepline.ai/api/v1/agents/{agent_slug}/flow \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pepline.ai/api/v1/agents/{agent_slug}/flow"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pepline.ai/api/v1/agents/{agent_slug}/flow', 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.pepline.ai/api/v1/agents/{agent_slug}/flow",
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://app.pepline.ai/api/v1/agents/{agent_slug}/flow"
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://app.pepline.ai/api/v1/agents/{agent_slug}/flow")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/agents/{agent_slug}/flow")
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{
"object": "<string>",
"agent": "<string>",
"name": "<string>",
"version": 123,
"phases": [
{
"object": "<string>",
"id": 123,
"key": "<string>",
"title": "<string>",
"position": 123,
"objective": "<string>",
"exit_criteria": "<string>",
"max_turns": 123,
"archived": true,
"slots": [
{
"object": "<string>",
"id": 123,
"key": "<string>",
"title": "<string>",
"archived": true,
"required": true,
"enum_values": [
"<string>"
],
"enum_labels": {},
"translations": {},
"description": "<string>"
}
],
"tools": [
"<string>"
]
}
],
"archetype": "<string>"
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}Flow
Get an agent's conversation flow
The agent’s active flow — its phases and each phase’s slots (the chips a visitor sees). The structural vocabulary (kind, tools, exits, transitions, guards) is read-only; author phases and slots via the endpoints below.
GET
/
agents
/
{agent_slug}
/
flow
Get an agent's conversation flow
curl --request GET \
--url https://app.pepline.ai/api/v1/agents/{agent_slug}/flow \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pepline.ai/api/v1/agents/{agent_slug}/flow"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pepline.ai/api/v1/agents/{agent_slug}/flow', 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.pepline.ai/api/v1/agents/{agent_slug}/flow",
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://app.pepline.ai/api/v1/agents/{agent_slug}/flow"
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://app.pepline.ai/api/v1/agents/{agent_slug}/flow")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/agents/{agent_slug}/flow")
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{
"object": "<string>",
"agent": "<string>",
"name": "<string>",
"version": 123,
"phases": [
{
"object": "<string>",
"id": 123,
"key": "<string>",
"title": "<string>",
"position": 123,
"objective": "<string>",
"exit_criteria": "<string>",
"max_turns": 123,
"archived": true,
"slots": [
{
"object": "<string>",
"id": 123,
"key": "<string>",
"title": "<string>",
"archived": true,
"required": true,
"enum_values": [
"<string>"
],
"enum_labels": {},
"translations": {},
"description": "<string>"
}
],
"tools": [
"<string>"
]
}
],
"archetype": "<string>"
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped; treat them like passwords.
Path Parameters
⌘I

