Skip to content
Talk to our solutions team

AI Knowledge API

Indexing and search across lexical, semantic and hybrid backends.

For concepts and configuration see the block documentation.

EndpointPurpose
POST /index/{backend}/{collection}Index one document
POST /index/all/{backend}/{collection}Index and refresh the whole collection
POST /bulk/{backend}/{collection}Bulk index
DELETE /index/{backend}/{collection}Delete from a collection
{
"docid": "01JB7CY1Q6R0GK09RZAVDQGF11",
"doctype": "company",
"contenttype": "text",
"document": { "name": "kis.ai", "legalname": "kis.ai LLC" }
}

docid is yours to choose and is the idempotency key — re-indexing the same docid replaces the document rather than duplicating it. Use a stable identifier from your own system; a generated one doubles your corpus on every reindex.

Embeddings are generated on the way in for any field declared semantically searchable, so you index documents rather than vectors.

{
"query": "connection keeps dropping",
"mode": "hybrid",
"limit": 5,
"filter": { "category": "networking" }
}
FieldNotes
queryThe search text
modelexical, semantic, hybrid or entity
limitMaximum results
filterFacet constraints, applied during the search, not after
offsetPagination

Filtering during the search rather than after it matters for correctness as much as speed: a post-filter can turn limit: 10 into two results, while an applied filter returns ten matching ones.

{
"results": [
{
"docid": "01JB7CY1Q6R0GK09RZAVDQGF11",
"score": 0.94,
"data": { "name": "Appleby Industries" },
"meta": { "match": "name matched" }
}
]
}

meta.match says why something ranked where it did — which is what you need when debugging a bad answer three layers up in a bot.

EndpointPurpose
GET /list/backendsBackends available in this deployment
GET /list/documentsCollections visible to the tenant

A collection missing from /list/documents after a deploy means its definition did not load — a quieter failure than an indexing error.

Bulk operations report per-document outcomes. A 200 does not mean every document landed; check the response and replay the failures.

Every request carries the platform tenancy headers — X-Kis-Tenant, X-Kis-Product and X-Kis-Environment. They are the partition key for storage, quotas and audit, so a request without them is rejected rather than served against a default tenant.

Errors use the platform’s structured error body: a stable code, a human-readable message, and the request id to correlate against logs and audit.

Every route requires a bearer token:

Authorization: Bearer <token>

The health and readiness probes are the only unauthenticated surface.

The four CPET headers scope every backend, document and search. The semantic index is partitioned by CPET, so the same document id in two tenants is two documents.

StatusMeaning
400Request parse or validation failure, or an unknown backend
401Missing or invalid token, as plain text
404No such backend or document
500Unexpected server error, or an embedding provider failed