Knowledge-base content
Knowledge-base content endpoints of the Zanfia Workspace API, with schemas and code samples.
Content of Knowledge base products, addressed by the product id: articles and the category tree. Writes commit the published fields and clear any in-progress dashboard draft; article and tree updates are applied in one atomic write. All routes require a Authorization: Bearer header — see Authentication.
Knowledge-base overview
/products/{productId}/kbAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Product id
Response Body
application/json
application/json
curl -X GET "https://example.com/products/string/kb"{ "knowledgeBaseId": "string", "name": "string", "categoriesTree": [ { "title": "string", "key": "string", "type": "string", "children": [ {} ], "isLeaf": true, "status": "string", "oldCategoryName": "string" } ], "articles": [ { "id": "string", "title": "string", "status": "draft", "parentId": "string", "updatedAt": "string", "hasUnpublishedDraft": true } ]}{ "error": "string"}Get article
/products/{productId}/kb/articles/{articleId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Product id
Response Body
application/json
application/json
curl -X GET "https://example.com/products/string/kb/articles/string"{ "id": "string", "title": "string", "status": "draft", "editorContent": "string", "parentId": "string", "category": "string", "attachments": [ { "url": "string", "name": "string", "uid": "string" } ], "images": [ "string" ], "createdAt": "string", "updatedAt": "string", "hasUnpublishedDraft": true}{ "error": "string"}Update article
/products/{productId}/kb/articles/{articleId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Product id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Patch of the article's CANONICAL fields — at least one field required. A server write is a committed edit: it also clears the dashboard editor's unpublished draft* mirror for this article (publish semantics), and it rebuilds the KB's categoriesTree atomically in the same write.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/products/string/kb/articles/string" \ -H "Content-Type: application/json" \ -d '{}'{ "articleId": "string", "updated": true}{ "error": "string"}Delete article
/products/{productId}/kb/articles/{articleId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Product id
Response Body
application/json
application/json
curl -X DELETE "https://example.com/products/string/kb/articles/string"{ "articleId": "string", "deleted": true}{ "error": "string"}Create article
/products/{productId}/kb/articlesAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Product id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/products/string/kb/articles" \ -H "Content-Type: application/json" \ -d '{ "title": "string", "parentId": "string" }'{ "articleId": "string"}{ "error": "string"}Add category
/products/{productId}/kb/categoriesAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Product id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/products/string/kb/categories" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "categoryId": "string"}{ "error": "string"}Rename category
/products/{productId}/kb/categories/{categoryId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Product id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/products/string/kb/categories/string" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "categoryId": "string", "updated": true}{ "error": "string"}Delete category
/products/{productId}/kb/categories/{categoryId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Product id
Query Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/products/string/kb/categories/string"{ "categoryId": "string", "deleted": true, "deletedArticleIds": [ "string" ]}{ "error": "string"}Was this article helpful?

