Create Category
Create a new category to organize knowledge items.
Endpoint
POST /v1/workspaces/{workspaceId}/categoryRequest
curl -X POST \
'https://api.sharely.ai/v1/workspaces/{workspaceId}/category' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'organizationid: your-organization-id' \
-d '{
"name": "Product Documentation",
"description": "All product-related docs",
"parentId": null,
"metadata": {
"color": "blue",
"icon": "book"
}
}'Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Category name |
description | string | No | Category description |
parentId | string (UUID) | No | Parent category ID for hierarchical structure |
metadata | object | No | Custom metadata fields |
Response
{
"id": "category-uuid",
"workspaceId": "workspace-uuid",
"name": "Product Documentation",
"description": "All product-related docs",
"parentId": null,
"metadata": {
"color": "blue",
"icon": "book"
},
"createdAt": "2024-11-14T15:30:00Z",
"updatedAt": "2024-11-14T15:30:00Z"
}