Docs
API ReferenceReferenceKnowledgebases

Search a knowledgebase

POST
/knowledgebases/{knowledgebaseId}/search

Searches ingested documents (semantic + keyword), pages (full text) and, with a personal key, the member's own memories, in one call. Use all as the id to search every knowledgebase this key may read. Each result carries a citation (sourceId + documentName, pageId, or the memory id). Searching documents spends one of the organization's credits per request; pages and memories are free, so pass kinds: ["pages"] when documents are not needed. Requires the knowledge:read scope.

AuthorizationBearer <token>

An organization API key, created from a Portal's Webhooks page (Provisioning API card). The secret is shown once at creation and stored only as a hash. Keys are organization-wide and carry scopes (end_users:read, end_users:write). Rate limit: 120 requests per minute per key (sliding 60-second window).

In: header

Path Parameters

knowledgebaseId*string

A knowledgebase id, or all for every knowledgebase this key may read.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/knowledgebases/string/search" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{  "query": "string",  "results": [    {      "kind": "document",      "id": "string",      "knowledgebaseId": "2eaa043e-18a5-42f0-bbe8-1ad77d6f870c",      "title": "string",      "snippet": "string",      "score": 0,      "sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2",      "documentName": "string",      "pageId": "347b9bf8-fe00-46f6-b8ca-1e06b3bd5809",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "searched": [    "documents"  ],  "chargedCredits": 0}