Knowledge
List knowledge bases
Lists the organization's knowledge bases.
GET https://api.diska.ai/v1/knowledge-bases
Scope: knowledge:read
Parameters
Query string
| Name | Type | Required | Description |
|---|---|---|---|
search | string | null | No | Text contained in the name or the instruction. Up to 200 characters. |
Examples
curl "https://api.diska.ai/v1/knowledge-bases" \
-H "Authorization: Bearer $DISKA_API_KEY"
import os
import requests
response = requests.get(
"https://api.diska.ai/v1/knowledge-bases",
headers={"Authorization": f"Bearer {os.environ['DISKA_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())
// Node.js 18 or later, in a .mjs file
const response = await fetch('https://api.diska.ai/v1/knowledge-bases', {
headers: { Authorization: `Bearer ${process.env.DISKA_API_KEY}` }
})
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())
<?php
$ch = curl_init('https://api.diska.ai/v1/knowledge-bases');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('DISKA_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) {
throw new RuntimeException("HTTP $status: $body");
}
print_r(json_decode($body, true));
Try it
Send the request from this page, with your key. The key stays on this page: it is not stored and is only sent to api.diska.ai. Use a test key with the fewest scopes you need.
GET
https://api.diska.ai/v1/knowledge-basesStarts with dsk_. It stays in this browser tab only.
query
Enter an API key (dsk_…).
Response 200
| Field | Type | Description |
|---|---|---|
items | array | The knowledge bases. |
items[].id | string | ID. |
items[].organization_id | string | Organization it belongs to. |
items[].name | string | Base name. |
items[].instruction | string | When and how the agent should use this base. |
items[].description | string | null | Description, or null. |
items[].document_count | integer | Number of documents. Default: 0. |
items[].assigned_agent_count | integer | Agents that use this base. Default: 0. |
items[].created_at | string | null | Creation date (ISO 8601). |
items[].updated_at | string | null | Last change date (ISO 8601). |
{
"items": [
{
"id": "b2e4c6d8-1a3f-4e5b-9c7d-0f2a4b6c8e10",
"organization_id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
"name": "Produtos e preços",
"instruction": "Use esta base para responder a perguntas sobre produtos, preços e horários.",
"description": "Tabela de preços e horários de 2026.",
"document_count": 3,
"assigned_agent_count": 1,
"created_at": "2026-10-25T18:40:00Z",
"updated_at": "2026-10-25T18:40:00Z"
}
]
}
Errors
This endpoint has no errors of its own.
Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

