Delete Category
Soft-deletes a category: it disappears from every read. Only a childless, non-root category can be deleted.
- A category with children is refused: deleting it would orphan them, because their
pathwould point at a deleted ancestor. Delete the subtree bottom-up first. - The root category (
int_id1) cannot be deleted. - The parent's
is_leafis left as it is: emptying a branch does not turn it into a leaf.
A second delete of the same category answers "category not found".
Required permission: category:delete
Request
DELETE /v2/admin/categories/{category_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
category_id | string | path | Required. Category id (24-character hex) |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Example
curl --request DELETE \
--url '{{baseUrl}}/v2/admin/categories/6911a3c2e4b0f51d2c8a7e41' \
--header 'Authorization: Bearer <access_token>'
Response
204 No Content with an empty body.
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10016 | category_id is not a valid 24-character hex id |
| 400 | 10001 | Category not found or already deleted (domain 4) |
| 400 | 10004 | The category has children and cannot be deleted (domain 4) |
| 400 | 10005 | The root category cannot be deleted (domain 4) |
See Errors for the error format and common codes.