Workspace API

Knowledge-base content

Knowledge-base content endpoints of the Zanfia Workspace API, with schemas and code samples.

4 min readLast updated Jul 26, 2026

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

GET/products/{productId}/kb

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

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

GET/products/{productId}/kb/articles/{articleId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

articleId*string

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

PATCH/products/{productId}/kb/articles/{articleId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

articleId*string

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

DELETE/products/{productId}/kb/articles/{articleId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

articleId*string

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

POST/products/{productId}/kb/articles

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

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

POST/products/{productId}/kb/categories

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

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

PATCH/products/{productId}/kb/categories/{categoryId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

categoryId*string

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

DELETE/products/{productId}/kb/categories/{categoryId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

categoryId*string

Query Parameters

deleteArticles?boolean

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?

Related articles

Spotted something off? Tell us at support@zanfia.com.