KnowledgeBase
Semantic search across indexed knowledge documents
Authorization
SupabaseBearer AuthorizationBearer <token>
Supabase user access token (Authorization: Bearer JWT)
In: header
Header Parameters
x-organization-id*string
Must match the organizationId path segment
Format
uuidx-organization-role*string
Portal impersonation role (pair with x-organization-id)
Value in
- "ORG_ADMIN"
- "ORG_MEMBER"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/knowledge-base/search" \ -H "x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "x-organization-role: ORG_ADMIN" \ -H "Content-Type: application/json" \ -d '{ "query": "string" }'{ "query": "string", "count": 0, "results": [ { "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052", "chunkIndex": 0, "title": "string", "snippet": "string", "scope": "org", "sourceType": "upload", "sourceUri": "string", "score": 0, "location": { "lineStart": 1, "lineEnd": 1, "pageNumber": 1, "pageCount": 1, "highlightRects": [ { "pageNumber": 1, "x1": 0, "y1": 0, "x2": 0, "y2": 0 } ] }, "mimeType": "string", "retrieval": {} } ]}{ "message": "string"}Empty
{ "message": "string"}Empty