Knowledge base API for categories

I’m trying to move Knowledge Base from zendesk.

Unfortunately, I couldn’t find any description of the KB API. Just a couple of questions here.

Can someone tell me how to create or edit a category?

I could only find the path /api/v1/knowledge_bases/1/categories/3 which shows pointers to answers in the category and branch membership. But it doesn’t even show the name.

{
  "id": 3,
  "knowledge_base_id": 1,
  "parent_id": 1,
  "category_icon": "f115",
  "position": 1,
  "created_at": "2023-09-02T12:16:38.898Z",
  "updated_at": "2023-09-02T20:35:18.455Z",
  "translation_ids": [
    3
  ],
  "answer_ids": [
    2,
    6
  ],
  "child_ids": [
    3
  ],
  "permission_ids": [],
  "permissions_effective": [
    {
      "id": 1,
      "permissionable_type": "KnowledgeBase",
      "permissionable_id": 1,
      "role_id": 1,
      "access": "editor",
      "created_at": "2023-09-02T12:44:14.604Z",
      "updated_at": "2023-09-02T12:44:14.604Z"
    },
    {
      "id": 2,
      "permissionable_type": "KnowledgeBase",
      "permissionable_id": 1,
      "role_id": 2,
      "access": "reader",
      "created_at": "2023-09-02T12:44:14.606Z",
      "updated_at": "2023-09-02T12:44:14.606Z"
    },
    {
      "id": 5,
      "permissionable_type": "KnowledgeBase",
      "permissionable_id": 1,
      "role_id": 4,
      "access": "reader",
      "created_at": "2023-09-02T17:07:25.502Z",
      "updated_at": "2023-09-02T17:07:25.502Z"
    }
  ]
}

I can’t really help you here.
The knowledgebase API is fairly complex and difficult to wrap around.

My tip for you would be to create one or two categories and answers inside of them and having a look in the developers tools “network” tab while doing so.

This will give you the endpoints Zammad uses and also what payloads it sends. This should give you a rough idea on how to talk to these endpoints. I hope that helps.