API reference
6 operations in rag. Raw spec: openapi.json.
POST
/api/v1/rag/chunksPOST /api/v1/rag/chunks — batch upsert of RAG passage and media chunks.
Request body
RagIngestRequest
Responses
| Status | Description |
|---|---|
200 | |
401 | not authenticated |
403 | missing kb:edit / rag.write permission |
409 | idempotency key reused or version conflict |
422 | validation error or wrong-width vector (must be 768) |
Security: bearer
POST
/api/v1/rag/deletePOST /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
| Status | Description |
|---|---|
200 | |
401 | not authenticated |
403 | missing kb:edit / rag.write permission |
409 | idempotency key reused or version conflict |
422 | invalid namespace or source identifier |
Security: bearer
GET
/api/v1/rag/deletion-receiptsGET /api/v1/rag/deletion-receipts — lists verifiable deletion receipts for the caller's org (including receipts minted automatically by core entity deletion cascades).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | query | — | No | |
source_kind | query | — | No | |
source_id | query | — | No | |
limit | query | integer | No |
Responses
| Status | Description |
|---|---|
200 | |
401 | not authenticated |
403 | missing 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Deletion receipt ID |
Responses
| Status | Description |
|---|---|
200 | |
401 | not authenticated |
403 | missing kb:view / rag.read permission |
404 | receipt not found in caller's org |
Security: bearer
POST
/api/v1/rag/queryPOST /api/v1/rag/query — hybrid BM25 + exact-KNN vector query with RRF fusion and mandatory source attribution.
Request body
RagQueryRequest
Responses
| Status | Description |
|---|---|
200 | |
401 | not authenticated |
403 | missing kb:view / rag.read permission |
422 | invalid 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
source_kind | path | string | Yes | Source entity family (e.g. ticket, attachment, kb_article) |
source_id | path | string | Yes | Source identifier within source_kind |
namespace | query | string | No | Target 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
| Status | Description |
|---|---|
200 | |
401 | not authenticated |
403 | missing kb:edit / rag.write permission |
422 | invalid namespace or source identifier |
Security: bearer