| GET | /me | Who am I |
| GET | /bases | List knowledge bases |
| POST | /bases | Create a knowledge base |
| GET | /bases/{kbId} | Get a knowledge base |
| PATCH | /bases/{kbId} | Update a knowledge base |
| POST | /bases/{kbId}/search | Search entries |
| POST | /bases/{kbId}/ask | Ask (grounded answer) |
| GET | /bases/{kbId}/entries | List entries |
| GET | /bases/{kbId}/subjects | List subjects |
| POST | /bases/{kbId}/entries | Add one entry |
| PATCH | /bases/{kbId}/entries/{id} | Edit an entry |
| DELETE | /bases/{kbId}/entries/{id} | Delete an entry |
| POST | /bases/{kbId}/entries/bulk | Bulk action |
| POST | /bases/{kbId}/import | Import ready Q&A pairs |
| GET | /bases/{kbId}/export | Export entries |
| POST | /bases/{kbId}/submissions | Submit material for extraction |
| GET | /bases/{kbId}/messages | Submission history |
| DELETE | /bases/{kbId}/messages/{id} | Delete a submission turn |
| GET | /bases/{kbId}/sources | List sources |
| POST | /bases/{kbId}/sources/upload | Upload a source |
| GET | /bases/{kbId}/sources/{id}/download | Download the original file |
| DELETE | /bases/{kbId}/sources/{id} | Delete a source and its entries |
| GET | /bases/{kbId}/unanswered | Unanswered questions (gaps) |
| DELETE | /bases/{kbId}/unanswered | Clear unanswered questions |
/mescope · readWho am I
Confirms the token works and tells you what it may do on this resource. Always call this first.
No parameters
curl https://api.simplynice.ai/api/ai/knowledge/me -H "Authorization: Bearer $DJC_TOKEN"{
"userId": "Qrpc3k06…", "orgId": "d3fe674f-…",
"tokenKind": "token",
"access": "write",
"scopes": ["knowledge:write", "workflows:read"],
"knowledgeBaseId": null,
"base": "/bases"
}access is the highest level this token holds on Knowledge. knowledgeBaseId is only set for legacy per-base keys; personal tokens see every base in the workspace.
| Status | When |
|---|---|
401 | Missing, revoked or expired token. |
403 | Token lacks knowledge:read (INSUFFICIENT_SCOPE). |
/basesscope · readList knowledge bases
Every base in your workspace, most recently updated first.
No parameters
curl https://api.simplynice.ai/api/ai/knowledge/bases -H "Authorization: Bearer $DJC_TOKEN"[ {
"id": "5327d9b2-…", "orgId": "d3fe674f-…",
"name": "Product FAQ", "description": "Answers about the X-series product line.",
"embeddingModel": "qwen3.7-text-embedding",
"reviewBeforeIndex": false, "defaultLanguage": null,
"sourceCount": 3, "entryCount": 142, "indexing": false,
"lastIndexedAt": "2026-08-29T07:55:47Z",
"createdAt": "2026-08-29T07:05:04Z", "updatedAt": "2026-08-29T07:56:28Z"
} ]| Status | When |
|---|---|
403 | Token lacks knowledge:read (INSUFFICIENT_SCOPE). |
/basesscope · read & writeCreate a knowledge base
Creates an empty base. Keep description accurate — flows read it to decide *when* to search this base.
| Parameter | Type | Description |
|---|---|---|
namerequired | string | 1–120 characters. |
description | string | Up to 2000 characters. Shown to the model that decides whether to search this base. |
reviewBeforeIndex | boolean | When true, AI-extracted entries land as drafts until approved. Default false. |
defaultLanguage | string | Language extraction should write questions and answers in. Default: the source's language. |
curl -X POST https://api.simplynice.ai/api/ai/knowledge/bases -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{ "name": "Product FAQ", "description": "Answers about the X-series product line." }'{
"id": "5327d9b2-…", "orgId": "d3fe674f-…",
"name": "Product FAQ", "description": "Answers about the X-series product line.",
"embeddingModel": "qwen3.7-text-embedding",
"reviewBeforeIndex": false, "defaultLanguage": null,
"sourceCount": 3, "entryCount": 142, "indexing": false,
"lastIndexedAt": "2026-08-29T07:55:47Z",
"createdAt": "2026-08-29T07:05:04Z", "updatedAt": "2026-08-29T07:56:28Z"
}| Status | When |
|---|---|
400 | Invalid body, or the workspace already has 50 bases. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}scope · readGet a knowledge base
Name, description, counts and indexing state.
curl https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID -H "Authorization: Bearer $DJC_TOKEN"{
"id": "5327d9b2-…", "orgId": "d3fe674f-…",
"name": "Product FAQ", "description": "Answers about the X-series product line.",
"embeddingModel": "qwen3.7-text-embedding",
"reviewBeforeIndex": false, "defaultLanguage": null,
"sourceCount": 3, "entryCount": 142, "indexing": false,
"lastIndexedAt": "2026-08-29T07:55:47Z",
"createdAt": "2026-08-29T07:05:04Z", "updatedAt": "2026-08-29T07:56:28Z"
}| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
/bases/{kbId}scope · read & writeUpdate a knowledge base
Any of name, description, reviewBeforeIndex, defaultLanguage. Deleting a base is only possible in the app.
curl -X PATCH https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{ "description": "Answers about the X-series product line and its warranty." }'{
"id": "5327d9b2-…", "orgId": "d3fe674f-…",
"name": "Product FAQ", "description": "Answers about the X-series product line.",
"embeddingModel": "qwen3.7-text-embedding",
"reviewBeforeIndex": false, "defaultLanguage": null,
"sourceCount": 3, "entryCount": 142, "indexing": false,
"lastIndexedAt": "2026-08-29T07:55:47Z",
"createdAt": "2026-08-29T07:05:04Z", "updatedAt": "2026-08-29T07:56:28Z"
}| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
DELETE /bases/{kbId}always returns403— a base (and every entry in it) can only be deleted from the app.
/bases/{kbId}/searchscope · readSearch entries
Hybrid retrieval — vector similarity plus full-text, fused. No model call, so it does not use credits. Counts as a **read**.
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Up to 1000 characters. |
topK | number | 1–20, default 8. |
minScore | number | 0–1 cosine floor for the vector leg, default 0.35. Below it, an entry is only returned if full-text also matched. |
curl -X POST https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/search -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{ "query": "warranty on the X200", "topK": 3 }'{
"hits": [
{ "id": "…", "subject": "Warranty", "question": "What is the warranty on the X200?",
"answer": "Two years from the date of purchase, parts and labour.",
"altQuestions": ["X200 warranty length"], "sourceId": "…", "sourceTitle": "X-series datasheet", "page": 4,
"vectorScore": 0.81, "score": 0.0328 }
],
"embeddingTokens": 12
}vectorScore is the cosine similarity (≥ 0.6 is a strong match, 0.35–0.6 related). score is the fused rank — use it for ordering only. Every hit increments that entry's hitCount; a query with no hits is recorded under *unanswered*.
| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
403 | Token lacks knowledge:read (INSUFFICIENT_SCOPE). |
/bases/{kbId}/askscope · readAsk (grounded answer)
Runs the same search, then has the model answer **only** from the hits — exactly what a flow's Knowledge tool sees. Uses credits. Counts as a **read**.
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | The customer's question. |
topK | number | 1–20, default 6. |
minScore | number | Default 0.35. |
curl -X POST https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/ask -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{ "query": "How long is the X200 warranty?" }'{
"answer": "Two years from purchase (parts and labour); batteries one year.",
"hits": [ … ],
"usage": { "model": "qwen3.7-flash", "inputTokens": 412, "outputTokens": 38, "credits": 0.01 }
}No match → { "answer": null, "hits": [], "note": "No entries matched this question." } and the query is logged under *unanswered*.
| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
402 | Your credit balance in this workspace is 0 (INSUFFICIENT_CREDITS, balance in details.balance). |
403 | Token lacks knowledge:read (INSUFFICIENT_SCOPE). |
/bases/{kbId}/entriesscope · readList entries
Filter, sort and page through a base's entries.
| Parameter | Type | Description |
|---|---|---|
q | string | Substring match on question, answer or subject. |
subject | string | Exact subject. |
source | string | Only entries extracted from this source id. |
status | string | active · draft · archived · all · conflicts · expiring. Default: everything except archived. |
sort | string | newest (default) · hits · unused · subject. |
limit | number | 1–500. |
offset | number | For paging. |
curl "https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/entries?subject=Shipping&limit=50" -H "Authorization: Bearer $DJC_TOKEN"{ "items": [ {
"id": "6f2c…", "subject": "Shipping", "question": "Do you ship to Singapore?",
"altQuestions": ["International shipping", "Can I order from Singapore?"],
"answer": "Not yet — we ship within Malaysia only.",
"keywords": ["Singapore", "international"],
"sourceExcerpt": null, "page": null,
"status": "active", "conflictOfId": null, "validUntil": null,
"hitCount": 0, "lastHitAt": null,
"sourceId": null, "sourceTitle": null, "messageId": null,
"createdAt": "2026-08-29T08:05:34Z", "updatedAt": "2026-08-29T08:05:34Z"
} ], "total": 1 }| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
/bases/{kbId}/subjectsscope · readList subjects
The subject taxonomy in use, most used first. Reuse these when you add entries instead of inventing near-duplicates.
No parameters
curl https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/subjects -H "Authorization: Bearer $DJC_TOKEN"[ { "subject": "Shipping", "count": 12 }, { "subject": "Returns", "count": 9 }, { "subject": "Warranty", "count": 4 } ]| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
/bases/{kbId}/entriesscope · read & writeAdd one entry
A hand-written Q&A pair, indexed immediately and active. One fact per entry; put the wordings in altQuestions, not in separate entries. Costs only the embedding (tiny).
| Parameter | Type | Description |
|---|---|---|
subjectrequired | string | 1–60 chars, Title Case, one or two words. Part of the embedding text. |
questionrequired | string | 1–500 chars. An exact duplicate (case-insensitive) of an existing question is rejected. |
answerrequired | string | 1–2000 chars, complete and self-contained — the model only ever sees matched entries. |
altQuestions | string[] | Up to 5 paraphrases (≤ 300 chars each) to improve recall. |
keywords | string[] | Up to 10 product codes, names, numbers that keyword search should hit. |
validUntil | string | null | ISO datetime for promotions and seasonal facts. Listed under status=expiring 30 days before. |
curl -X POST https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/entries -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{
"subject": "Shipping",
"question": "Do you ship to Singapore?",
"altQuestions": ["International shipping", "Can I order from Singapore?"],
"answer": "Not yet — we ship within Malaysia only.",
"keywords": ["Singapore", "international"]
}'{
"id": "6f2c…", "subject": "Shipping", "question": "Do you ship to Singapore?",
"altQuestions": ["International shipping", "Can I order from Singapore?"],
"answer": "Not yet — we ship within Malaysia only.",
"keywords": ["Singapore", "international"],
"sourceExcerpt": null, "page": null,
"status": "active", "conflictOfId": null, "validUntil": null,
"hitCount": 0, "lastHitAt": null,
"sourceId": null, "sourceTitle": null, "messageId": null,
"createdAt": "2026-08-29T08:05:34Z", "updatedAt": "2026-08-29T08:05:34Z",
"conflicts": 0
}conflicts is 1 when the new entry is ≥ 0.92 similar to an existing one; it is then stored as a **draft** with conflictOfId set, and is not searchable until you resolve it.
| Status | When |
|---|---|
400 | Invalid body, or an entry with this exact question already exists. |
404 | Knowledge base not found in your workspace. |
402 | Your credit balance in this workspace is 0 (INSUFFICIENT_CREDITS, balance in details.balance). |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/entries/{id}scope · read & writeEdit an entry
Any of subject, question, answer, altQuestions, keywords, validUntil, status, or resolveConflict. Text changes re-embed the entry automatically.
| Parameter | Type | Description |
|---|---|---|
status | string | active · draft · archived. |
resolveConflict | string | keep — both entries stay, flag cleared. replace — archives the older entry and activates this one. |
curl -X PATCH https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/entries/$ENTRY_ID -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{ "answer": "Two years from purchase (parts and labour). Batteries: one year.",
"altQuestions": ["X200 warranty length", "Is the X200 battery covered?"] }'{
"id": "6f2c…", "subject": "Shipping", "question": "Do you ship to Singapore?",
"altQuestions": ["International shipping", "Can I order from Singapore?"],
"answer": "Not yet — we ship within Malaysia only.",
"keywords": ["Singapore", "international"],
"sourceExcerpt": null, "page": null,
"status": "active", "conflictOfId": null, "validUntil": null,
"hitCount": 0, "lastHitAt": null,
"sourceId": null, "sourceTitle": null, "messageId": null,
"createdAt": "2026-08-29T08:05:34Z", "updatedAt": "2026-08-29T08:05:34Z"
}| Status | When |
|---|---|
404 | Entry not found in this base. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/entries/{id}scope · read & writeDelete an entry
Permanent. Prefer status: "archived" when you may want it back.
curl -X DELETE https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/entries/$ENTRY_ID -H "Authorization: Bearer $DJC_TOKEN"{ "ok": true }| Status | When |
|---|---|
404 | Entry not found. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/entries/bulkscope · read & writeBulk action
Apply one action to up to 500 entries.
| Parameter | Type | Description |
|---|---|---|
idsrequired | string[] | Up to 500 entry ids in this base. |
actionrequired | string | approve (draft → active, clears conflict flags) · activate · archive · delete · setSubject. |
subject | string | Required for setSubject. Re-embeds in the background. |
curl -X POST https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/entries/bulk -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{ "ids": ["6f2c…", "a41b…"], "action": "approve" }'{ "affected": 2 }| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/importscope · read & writeImport ready Q&A pairs
The fast path for pairs you already have (a spreadsheet, another system). Stored verbatim and indexed immediately — no AI rewriting, embedding cost only.
| Parameter | Type | Description |
|---|---|---|
rowsrequired | object[] | 1–2000 rows of { subject?, question, answer, altQuestions?, keywords? }. Missing subject → General. |
curl -X POST https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/import -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{ "rows": [
{ "subject": "Shipping", "question": "Do you ship to Singapore?", "answer": "Not yet — Malaysia only." },
{ "question": "What are your office hours?", "answer": "Mon–Fri 9am–6pm." }
] }'{ "inserted": 2, "duplicates": 0, "conflicts": 0 }duplicates — exact-duplicate questions skipped (against the base and within the batch). conflicts — near-duplicates stored as drafts; review them under entries?status=conflicts. Everything else lands active, even when the base uses review mode.
| Status | When |
|---|---|
400 | Invalid rows, or the import would take the base past 20 000 entries. |
404 | Knowledge base not found in your workspace. |
402 | Your credit balance in this workspace is 0 (INSUFFICIENT_CREDITS, balance in details.balance). |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/exportscope · readExport entries
All non-archived entries as CSV or JSON.
| Parameter | Type | Description |
|---|---|---|
format | string | csv (default) or json. |
curl "https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/export?format=csv" -H "Authorization: Bearer $DJC_TOKEN" -o entries.csvsubject,question,answer,altQuestions,keywords,status,validUntil
Shipping,Do you ship to Singapore?,Not yet — Malaysia only.,International shipping | Can I order from Singapore?,Singapore | international,active,| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
/bases/{kbId}/submissionsscope · read & writeSubmit material for extraction
Send raw text (or point at uploaded sources) and the AI extracts Q&A pairs into the base. Use this for documents and pasted text — **not** for ready-made pairs (use import). Uses credits.
| Parameter | Type | Description |
|---|---|---|
textrequired | string | Up to 400 000 characters. With no attachments this **is** the material; with attachments it is an instruction ("Focus on prices and warranty"). |
attachments | object[] | Up to 8 { sourceId } from *Upload a source*. |
webSearch | boolean | Let the model add verified facts from the web (extra per-search fee). |
curl -X POST https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/submissions -H "Authorization: Bearer $DJC_TOKEN" -H "Content-Type: application/json" \
-d '{ "text": "## Returns policy\nItems can be returned within 30 days of delivery in original packaging. Refunds are issued within 5 working days of receipt.\n\n## Shipping\nWest Malaysia: RM 8 flat, 2–4 working days. Free above RM 150." }'{
"status": "success",
"userMessageId": "…", "assistantMessageId": "…",
"title": "Returns & Shipping Policy",
"summary": "Return window, refund timing and domestic shipping rates.",
"entries": [ { "id": "…", "subject": "Returns", "question": "How long do I have to return an item?", "answer": "30 days from delivery, in original packaging.", "status": "active" }, … ],
"extraction": { "status": "done", "windows": 1, "pairsExtracted": 5, "pairsInserted": 5, "duplicates": 0, "conflicts": 0,
"inputTokens": 412, "outputTokens": 590, "embeddingTokens": 380, "credits": 0.02 },
"statusLog": ["Extracting 1 of 1…", "Indexing 5 entries…"]
}The response is returned once extraction finishes (typically seconds; large documents take longer). Add ?stream=1 to receive NDJSON events (status, entry, title, done, error) as they happen. 5–40 k characters per call gives the best pair quality.
| Status | When |
|---|---|
400 | Text too long, too many attachments, or the base holds 20 000 entries. |
404 | Knowledge base not found in your workspace. |
402 | Your credit balance in this workspace is 0 (INSUFFICIENT_CREDITS, balance in details.balance). |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/messagesscope · readSubmission history
The base's studio thread — each submission and the extraction report that answered it.
| Parameter | Type | Description |
|---|---|---|
limit | number | 1–200, default 60. |
before | string | ISO datetime — return turns older than this. |
curl "https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/messages?limit=20" -H "Authorization: Bearer $DJC_TOKEN"{
"items": [
{ "id": "…", "role": "user", "content": "## Returns policy…", "attachments": [], "entries": [ … ], "createdAt": "…" },
{ "id": "…", "role": "assistant", "content": "Returns & Shipping Policy", "extraction": { "status": "done", … }, "entries": [], "createdAt": "…" }
],
"hasMore": false
}| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
/bases/{kbId}/messages/{id}scope · read & writeDelete a submission turn
Removes the turn and its paired reply from the thread. Entries extracted from it are kept.
curl -X DELETE https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/messages/$MESSAGE_ID -H "Authorization: Bearer $DJC_TOKEN"{ "ok": true }| Status | When |
|---|---|
404 | Message not found. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/sourcesscope · readList sources
Every piece of material submitted to the base — uploaded files and pasted text — with how many entries each produced. Never returns the text itself.
No parameters
curl https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/sources -H "Authorization: Bearer $DJC_TOKEN"[ { "id": "…", "kind": "file", "title": "X-series datasheet", "fileName": "datasheet.pdf", "mimeType": "application/pdf",
"sizeBytes": 812331, "pageCount": 12, "charCount": 48210, "entryCount": 37, "status": "ready", "createdAt": "…" } ]| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
/bases/{kbId}/sources/uploadscope · read & writeUpload a source
Stores a document (the original is kept) together with its extracted text, ready to be attached to a submission. **The API does not parse PDFs or Office files** — send the text yourself.
| Parameter | Type | Description |
|---|---|---|
filerequired | file | ≤ 20 MB — pdf, doc, docx, xls, xlsx, csv, txt, md, json. |
contentrequired | string | The file's text, ≤ 400 000 characters. Mark page boundaries with lines --- page N --- so entries get page numbers. |
pageCount | number | For PDFs. |
curl -X POST https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/sources/upload -H "Authorization: Bearer $DJC_TOKEN" \
-F "file=@datasheet.pdf" -F "content=<datasheet.txt" -F "pageCount=12"{ "id": "b7e1…", "kind": "file", "title": "datasheet", "fileName": "datasheet.pdf", "charCount": 48210, "pageCount": 12, "entryCount": 0, "status": "ready", "createdAt": "…" }Then extract from it: POST /submissions { "text": "Focus on specifications and warranty.", "attachments": [{ "sourceId": "b7e1…" }] }. A source can be attached to one submission; upload again to extract again.
| Status | When |
|---|---|
400 | Unsupported type, file too large, or content missing. |
404 | Knowledge base not found in your workspace. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/sources/{id}/downloadscope · readDownload the original file
The stored file, as binary.
curl https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/sources/$SOURCE_ID/download -H "Authorization: Bearer $DJC_TOKEN" -o datasheet.pdf| Status | When |
|---|---|
404 | Source not found, or it was pasted text with no file. |
/bases/{kbId}/sources/{id}scope · read & writeDelete a source and its entries
Removes the source **and every entry extracted from it**.
curl -X DELETE https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/sources/$SOURCE_ID -H "Authorization: Bearer $DJC_TOKEN"{ "ok": true }| Status | When |
|---|---|
404 | Source not found. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |
/bases/{kbId}/unansweredscope · readUnanswered questions (gaps)
Real questions — from flows, the app's Test drawer and this API — that retrieval could not answer. Up to 200, most frequent first. Write entries for them, then clear the list.
No parameters
curl https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/unanswered -H "Authorization: Bearer $DJC_TOKEN"[ { "query": "do you ship to singapore", "count": 4, "lastAt": "2026-08-29T06:12:00Z" } ]| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
/bases/{kbId}/unansweredscope · read & writeClear unanswered questions
Clears one query (?query=) or all of them.
| Parameter | Type | Description |
|---|---|---|
query | string | The exact logged query. Omit to clear everything. |
curl -X DELETE "https://api.simplynice.ai/api/ai/knowledge/bases/$KB_ID/unanswered?query=do%20you%20ship%20to%20singapore" -H "Authorization: Bearer $DJC_TOKEN"{ "ok": true }| Status | When |
|---|---|
404 | Knowledge base not found in your workspace. |
403 | Token lacks knowledge:write (INSUFFICIENT_SCOPE). |