Skip to main content
POST
Create a knowledge base

Authorizations

Authorization
string
header
required

User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.

Body

application/json
name
string
required
Maximum string length: 256
description
string
Maximum string length: 4096
provider
enum<string>

Defaults to the platform-configured provider. Not strictly server-validated - an unsupported value surfaces as a 500 from the vector router rather than a 400.

Available options:
mock,
elasticsearch,
opensearch,
redis,
pgvector,
qdrant,
pinecone
embedding
object

Defaults to the platform-configured embedding model.

chunking_strategy
object
parser
enum<string>
Available options:
tika,
tika-ocr,
unstructured,
unstructured-ocr,
llm
file_parsing
object
agent_id
string

Binds the store to an agent (conversation scope).

expires_after
object

Optional expiry policy persisted on the store row (e.g. conversation-scoped stores).

Response

Knowledge base created (status creating until provisioned, then active).

Knowledge base metadata. PATCH is metadata-only; web-crawl configuration lives in /web_sources.

id
string
required
Maximum string length: 128
Pattern: ^vs_[A-Za-z0-9-]+$
object
enum<string>
required
Available options:
knowledge_base
name
string
required
Maximum string length: 256
provider
enum<string>
required
Available options:
mock,
elasticsearch,
opensearch,
redis,
pgvector,
qdrant,
pinecone
index_name
string
required

Physical index name on the provider.

embedding
object
required
status
enum<string>
required

creating before external resources are provisioned; active after metadata + physical setup + owner binding succeed; failed is a visible failed state with a cleanup-job hook; deleting is the transactional deletion window.

Available options:
creating,
active,
failed,
deleting
owner
object
required

First-class owner principal (§F-6). For agent-owned (conversation-scope) stores type: agent and id is the agent id - represented as a principalType: agent binding in the platform-managed product_bindings store, NOT a blanked owner_user_id. owner_user_id / agent_id below mirror this for convenience and filtering.

owner_org_slug
string
required

Tenant scope. All knowledge-base lookups are scoped by this field.

created_at
integer
required
description
string
Maximum string length: 4096
chunking_strategy
object

Default chunking for documents; overridable per document.

parser
enum<string> | null
Available options:
tika,
tika-ocr,
unstructured,
unstructured-ocr,
llm,
null
file_parsing
object | null
document_counts
object

Per-status aggregate over this store's documents. Maintained with transitions guarded by each document's index_generation - duplicate or stale crawler callbacks cannot corrupt counters.

owner_user_id
string | null

owner.id when owner.type == user; null for agent-owned stores.

agent_id
string | null

owner.id when owner.type == agent; null otherwise. Filterable on list.

role
enum<string> | null

Caller's effective role, computed at read time from access bindings. Null on cross-workspace (workspace_jwt) reads.

Available options:
owner,
admin,
editor,
reader,
null
access_reason
enum<string> | null
Available options:
owner,
admin_binding,
editor_binding,
reader_binding,
agent_binding,
trusted_workspace,
null
processing
object

Knowledge-base processing / parser-backend health (§F-5). The crawler is the universal parse/fetch backend for EVERY document (uploads, single pages, web crawl), so this is present whenever the knowledge base has documents - even with zero web sources. Live fields come from the crawler; when it is unreachable crawler_reachable is false and the live status/metrics degrade to null rather than erroring (replacing the legacy overloaded status:"unknown" + crawler_error). DB-derived per-seed counts live on /web_sources and remain available regardless.

crawl_settings
object

Engine-global crawl settings - one Crawler instance per KB, so these are the single values the crawler honors (they are NOT per-seed). Read from the store-level columns; edited via the KB PATCH (added 2026-07-17, web-sources crawl-settings re-home).

web_source_count
integer

Number of registered web sources (crawl seeds). Summary metadata for list cards - the seed objects themselves stay on /web_sources (added 2026-07-15, SPA migration F1).

Required range: x >= 0
last_active_at
integer | null

Unix seconds.

updated_at
integer