Samva
Samva
DashboardAPISamva DocumentationQuickstart GuideAuthentication

Api referenceKnowledgeBase

Query Knowledge Base

POST
/voice/knowledge-bases/{knowledgeBaseId}/query

Authorization

apiKey
X-API-Key<token>

API key for authentication

In: header

Path Parameters

knowledgeBaseId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://samva.app/api/v1/voice/knowledge-bases/497f6eca-6276-4993-bfeb-53cbbbba6f08/query" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{
  "results": [
    {
      "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
      "documentName": "string",
      "chunkIndex": -9007199254740991,
      "content": "string",
      "score": 0,
      "metadata": {
        "property1": null,
        "property2": null
      }
    }
  ],
  "query": "string"
}
query*string
Length1 <= length <= 2000
topK?integer
Default5
Range1 <= value <= 20