Create a category (desk:admin)
POST /api/desk/v1/categories
Module: Desk · operationId: createCategory · Tag: Configuration · Auth: access token (Authorization: Bearer <accessToken>)
Request body
application/json (required)
name(string, required): Name of the categoryarchived(boolean): Archived: the category is kept for existing data but no longer offered in pickersid(string): Id of the categoryparentId(string): Parent category (empty: top level)sortOrder(integer): Position in lists (ascending)
Example:
{
"name": "Firewall",
"parentId": "0c7d8e9f-1a2b-4c3d-8e5f-7a8b9c0d1e01",
"sortOrder": 3
}
Responses
- 201 Created (
application/json)
Fields of the 201 answer:
name(string, required): Name of the categoryarchived(boolean): Archived: the category is kept for existing data but no longer offered in pickersid(string): Id of the categoryparentId(string): Parent category (empty: top level)sortOrder(integer): Position in lists (ascending)
Example 201 answer:
{
"archived": false,
"id": "0c7d8e9f-1a2b-4c3d-8e5f-7a8b9c0d1e02",
"name": "WLAN",
"parentId": "0c7d8e9f-1a2b-4c3d-8e5f-7a8b9c0d1e01",
"sortOrder": 2
}
Example request
curl -X POST 'https://api.mbcom.cloud/api/desk/v1/categories' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"name":"Firewall","parentId":"0c7d8e9f-1a2b-4c3d-8e5f-7a8b9c0d1e01","sortOrder":3}'