List folders
curl --request GET \
--url https://api.zeroruntime.ai/v1/knowledge-bases/folders \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeroruntime.ai/v1/knowledge-bases/folders"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeroruntime.ai/v1/knowledge-bases/folders', 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.zeroruntime.ai/v1/knowledge-bases/folders",
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: <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.zeroruntime.ai/v1/knowledge-bases/folders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.zeroruntime.ai/v1/knowledge-bases/folders")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeroruntime.ai/v1/knowledge-bases/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"folderId": "f4p9z",
"name": "Product docs",
"parentId": null,
"depth": 1,
"docCount": 3,
"totalDocCount": 5,
"createdAt": "2026-10-13T09:00:00.000Z",
"updatedAt": "2026-10-13T09:00:00.000Z"
},
{
"folderId": "m2c7r",
"name": "Pricing",
"parentId": "f4p9z",
"depth": 2,
"docCount": 2,
"totalDocCount": 2,
"createdAt": "2026-10-13T09:05:00.000Z",
"updatedAt": "2026-10-13T09:05:00.000Z"
}
],
"unfiledCount": 4,
"maxDepth": 5
}{
"error": "<string>"
}Folders
List folders
Lists every folder as a flat list, shallowest first and then by name. Rebuild the tree from parentId.
GET
/
v1
/
knowledge-bases
/
folders
List folders
curl --request GET \
--url https://api.zeroruntime.ai/v1/knowledge-bases/folders \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeroruntime.ai/v1/knowledge-bases/folders"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeroruntime.ai/v1/knowledge-bases/folders', 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.zeroruntime.ai/v1/knowledge-bases/folders",
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: <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.zeroruntime.ai/v1/knowledge-bases/folders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.zeroruntime.ai/v1/knowledge-bases/folders")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeroruntime.ai/v1/knowledge-bases/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"folderId": "f4p9z",
"name": "Product docs",
"parentId": null,
"depth": 1,
"docCount": 3,
"totalDocCount": 5,
"createdAt": "2026-10-13T09:00:00.000Z",
"updatedAt": "2026-10-13T09:00:00.000Z"
},
{
"folderId": "m2c7r",
"name": "Pricing",
"parentId": "f4p9z",
"depth": 2,
"docCount": 2,
"totalDocCount": 2,
"createdAt": "2026-10-13T09:05:00.000Z",
"updatedAt": "2026-10-13T09:05:00.000Z"
}
],
"unfiledCount": 4,
"maxDepth": 5
}{
"error": "<string>"
}