Knowledge Bases & Search API

POST Knowledge Bases & Vector Search API

/api/v1/knowledge-bases

Manage AI knowledge bases, index FAQs, plain text, and PDF documents, and perform grounded vector search & Q&A.

Request Body Parameters

Field Type Required Description
name string Required Name of the Knowledge Base (e.g. "Support KB")
description string Optional Optional description of the knowledge base content.
status string Optional Status: active or inactive. Default is active.
Management Operations are Free

Creating, listing, updating, and deleting Knowledge Bases, Items, and Documents are 0 AI credits. Credits are only charged when performing embedding generation, document processing, vector search, or AI question answering.


Integration Journey

  1. Create Knowledge Base: POST /api/v1/knowledge-bases
  2. Add Knowledge Items / FAQs: POST /api/v1/knowledge-bases/{id}/items
  3. Upload Documents (PDF / TXT): POST /api/v1/knowledge-bases/{id}/documents
  4. Perform Vector Search: POST /api/v1/knowledge-bases/{id}/search
  5. Perform Grounded Q&A: POST /api/v1/knowledge-bases/{id}/ask

Example Knowledge Ask Request

JSON Request
{
  "question": "What is the refund policy for annual subscriptions?",
  "top_k": 3,
  "min_confidence": 0.3
}
cURL
curl -X POST https://rsflowhub.com/api/v1/knowledge-bases/1/ask \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What is the refund policy for annual subscriptions?"
  }'

Example Response

JSON Response
{
  "success": true,
  "data": {
    "answer": "Annual subscriptions are eligible for a full refund within 14 days of purchase.",
    "sources": [
      {
        "id": "12",
        "source_type": "faq",
        "title": "Refund Policy",
        "confidence": 0.94
      }
    ],
    "usage": {
      "credits_used": 3,
      "credits_remaining": 997
    }
  }
}

Ready to build?

Create your free account and make your first API call in minutes.