Documentation menu
These are pre-release docs from the main branch.

API reference

6 operations in rag. Raw spec: openapi.json.

POST/api/v1/rag/chunks

POST /api/v1/rag/chunks — batch upsert of RAG passage and media chunks.

Request body

RagIngestRequest

Responses

StatusDescription
200
401not authenticated
403missing kb:edit / rag.write permission
409idempotency key reused or version conflict
422validation error or wrong-width vector (must be 768)

Security: bearer

POST/api/v1/rag/delete

POST /api/v1/rag/delete — deletes all chunks for `(namespace, source_kind, source_id)` and returns a verifiable deletion receipt (supports arbitrary URI/slash `source_id` values and the IF1–IF3 idempotency envelope).

Request body

RagDeleteSourceRequest

Responses

StatusDescription
200
401not authenticated
403missing kb:edit / rag.write permission
409idempotency key reused or version conflict
422invalid namespace or source identifier

Security: bearer

GET/api/v1/rag/deletion-receipts

GET /api/v1/rag/deletion-receipts — lists verifiable deletion receipts for the caller's org (including receipts minted automatically by core entity deletion cascades).

Parameters

NameInTypeRequiredDescription
namespacequery—No
source_kindquery—No
source_idquery—No
limitqueryintegerNo

Responses

StatusDescription
200
401not authenticated
403missing kb:view / rag.read permission

Security: bearer

GET/api/v1/rag/deletion-receipts/{id}

GET /api/v1/rag/deletion-receipts/{id} — fetches a single verifiable deletion receipt by `receipt_id` under RLS.

Parameters

NameInTypeRequiredDescription
idpathstringYesDeletion receipt ID

Responses

StatusDescription
200
401not authenticated
403missing kb:view / rag.read permission
404receipt not found in caller's org

Security: bearer

POST/api/v1/rag/query

POST /api/v1/rag/query — hybrid BM25 + exact-KNN vector query with RRF fusion and mandatory source attribution.

Request body

RagQueryRequest

Responses

StatusDescription
200
401not authenticated
403missing kb:view / rag.read permission
422invalid query parameters or wrong-width query_vector (must be 768)

Security: bearer

DELETE/api/v1/rag/sources/{source_kind}/{source_id}

DELETE /api/v1/rag/sources/{source_kind}/{source_id} — deletes all chunks for `(namespace, source_kind, source_id)` and returns a verifiable deletion receipt.

Parameters

NameInTypeRequiredDescription
source_kindpathstringYesSource entity family (e.g. ticket, attachment, kb_article)
source_idpathstringYesSource identifier within source_kind
namespacequerystringNoTarget namespace from which to delete the source's chunks (defaults to `"default"` when omitted so parameterless probes and simple callers have a deterministic default).

Responses

StatusDescription
200
401not authenticated
403missing kb:edit / rag.write permission
422invalid namespace or source identifier

Security: bearer