KrosAI Docs
DashboardGet Started
  • Getting Started
    • Introduction
    • Quickstart Guide
    • Authentication
  • OpenAI SDK Compatability
  • Endpoints
    • Completions API
      • Create Chat Completion
    • Translation API
    • Text Summarization API
    • Audio Transcription API
    • Sentiment Analysis API
  • AGENT
    • Agents API
      • Create Agent
      • List Agents
      • Get Agent
      • Update Agent
      • Delete Agent
      • Start Voice Session
    • Conversations API
      • Create Conversation
      • List Conversations
      • Get Conversation
      • Get Conversation Messages
    • Knowledge Base API
      • Create Knowledge Base
      • List Knowledge Base
      • Upload Document
      • List Document
  • Resources
    • AI Voice Agents
    • In-App Voice Assistants
    • Virtual Health Assistants
    • EdTech Language Tutors
  • SDKS
    • Node.JS SDK
    • React Native SDK
    • Flutter
Powered by GitBook
On this page
  • Endpoint
  • Authentication
  • Response
  • Example Request
  • Example Response
  • Error Responses
  • Notes
  1. AGENT
  2. Knowledge Base API

List Knowledge Base

Retrieves all knowledge bases created by the authenticated user.

Endpoint

GET /v1/knowledge-bases

Authentication

Requires a valid API key or user authentication token.

Response

Returns an array of knowledge base objects.

Response Format

[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "created_at": "datetime",
    "updated_at": "datetime",
    "created_by": "string",
    "document_count": 0
  }
]

Response Fields

Field
Type
Description

id

string

Unique identifier for the knowledge base

name

string

Name of the knowledge base

description

string

Description of the knowledge base

created_at

datetime

When the knowledge base was created

updated_at

datetime

When the knowledge base was last updated

created_by

string

ID of the user who created the knowledge base

document_count

integer

Number of documents in the knowledge base

Example Request

curl -X GET "https://api.krosai.com/v1/knowledge-bases" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

[
  {
    "id": "kb-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Product Documentation",
    "description": "Technical documentation and user guides for KrosAI products",
    "created_at": "2023-07-10T15:30:00Z",
    "updated_at": "2023-07-10T15:30:00Z",
    "created_by": "user-12345",
    "document_count": 5
  },
  {
    "id": "kb-b2c3d4e5-f6g7-8901-bcde-fg2345678901",
    "name": "Support FAQs",
    "description": "Frequently asked questions and troubleshooting guides",
    "created_at": "2023-07-09T10:15:00Z",
    "updated_at": "2023-07-09T14:20:00Z",
    "created_by": "user-12345",
    "document_count": 12
  }
]

Error Responses

Status Code
Description

401

Unauthorized - Invalid or missing API key

500

Internal Server Error

Notes

  • Returns knowledge bases in reverse chronological order (newest first)

  • Only returns knowledge bases created by the authenticated user

  • Document count reflects the current number of successfully processed documents

  • Empty knowledge bases (document_count = 0) are included in the results

  • Use this endpoint to get an overview of all available knowledge bases

PreviousCreate Knowledge BaseNextUpload Document

Last updated 2 months ago