GET /v2/knowledge-bases
List knowledge bases available to the caller, newest first.
How to use
Discover KBs available to the authenticated caller; select the returned knowledge_base_id. Read items under data and follow next_cursor. Read successful resource payloads under data when a body is returned.
Authentication and permissions
Required permissions: kbs.read. Resource and owner access checks also apply.
Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.
Optional identifier for the page that should be returned. If it is not provided, the first page will be returned.
ZXhhbXBsZV9jdXJzb3I=Number of items to be returned in the page.
50Direction for pagination: 'next' to advance through pages (older items), 'prev' to go back (newer items)
nextPossible values: Successful Response
Machine-readable response code, when provided.
Validation Error
curl --fail-with-body -sS \
"$STACKAI_BASE_URL/v2/knowledge-bases" \
-H "Authorization: Bearer $STACKAI_API_KEY"{
"response_code": "text",
"meta": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": [
{
"knowledge_base_id": "123e4567-e89b-12d3-a456-426614174000",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"connection_source_ids": [
"text"
],
"website_sources": [
{
"source_type": "sitemap",
"original_search_term": "text",
"selected_resources": [
"text"
]
}
],
"source_file_authorization_enabled": true,
"connection_provider_type": "text",
"is_empty": true,
"total_size": 0,
"total_files": 0,
"total_indexed_files": 0,
"total_error_files": 0,
"last_synced_at": "2026-01-01T00:00:00.000Z",
"name": "Unnamed Knowledge Base",
"description": "",
"indexing_params": {
"ocr": false,
"embedding_params": {
"embedding_model": "text",
"api_key": "text"
},
"chunker_params": {
"chunk_size": 1500,
"chunk_overlap": 500,
"chunker_type": "sentence"
}
},
"org_level_role": "viewer",
"role": "viewer"
}
],
"next_cursor": "text",
"prev_cursor": "text",
"current_cursor": "text"
}Last updated
Was this helpful?

