curl --request GET \
--url https://api.example.com/api/get-flows.php{
"success": true,
"nodes": [
{
"id": 123,
"parent_id": {},
"node_type": "<string>",
"content": "<string>",
"options": [
{}
],
"metadata": {},
"order_position": 123,
"children": [
{}
]
}
]
}Retrieve the complete conversation flow tree
curl --request GET \
--url https://api.example.com/api/get-flows.php{
"success": true,
"nodes": [
{
"id": 123,
"parent_id": {},
"node_type": "<string>",
"content": "<string>",
"options": [
{}
],
"metadata": {},
"order_position": 123,
"children": [
{}
]
}
]
}curl https://your-domain.com/api/get-flows.php
null for root nodes"message" - Bot sends a message"question" - Bot asks a question and expects a response"menu" - Multiple choice options"end" - Conversation endpoint{
"success": true,
"nodes": [
{
"id": 1,
"parent_id": null,
"node_type": "message",
"content": "¡Bienvenido! ¿En qué puedo ayudarte?",
"options": [],
"metadata": {},
"order_position": 1,
"children": [
{
"id": 2,
"parent_id": 1,
"node_type": "menu",
"content": "Por favor elige una opción:",
"options": [
{"label": "Agendar cita", "value": "1"},
{"label": "Consultar información", "value": "2"},
{"label": "Hablar con un operador", "value": "3"}
],
"metadata": {},
"order_position": 1,
"children": [
{
"id": 3,
"parent_id": 2,
"node_type": "question",
"content": "¿Cuál es tu nombre completo?",
"options": [],
"metadata": {
"validation": "text",
"required": true
},
"order_position": 1,
"children": []
}
]
}
]
}
]
}
{
"success": false,
"error": "Error al obtener flujos"
}
| Type | Description | Has Options | Expects Response |
|---|---|---|---|
message | Bot sends information | No | No |
question | Bot asks for user input | No | Yes |
menu | Multiple choice selection | Yes | Yes |
end | Conversation termination | No | No |
| Status Code | Description |
|---|---|
| 200 | Flow tree retrieved successfully |
| 500 | Internal server error |
FlowBuilderService->getFlowTree() to retrieve all nodesorder_positionapi/get-flows.php:11-12
botMode: "classic") to process conversationsbotMode: "ai"), the RAG system handles conversations instead.