# How to manage article categories via API?

Categories organize the articles on your help center. The API lets you list,
create, update, and delete them, including one level of subcategories (parent >
child).


LIST CATEGORIES

curl -s -X GET \
  -H "Authorization: Bearer $HC_API_KEY" \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/categories"

Returns all categories with their subcategories nested under children:

{
  "object": "list",
  "data": [
    {
      "id": "cat_abc123",
      "name": "Getting Started",
      "description": "Articles for new users",
      "slug": "getting-started",
      "slug_id": 1,
      "translations": {
        "de": { "name": "Erste Schritte", "description": "..." }
      },
      "children": [
        { "id": "cat_def456", "name": "Installation", "slug": "installation", "slug_id": 2 }
      ]
    }
  ]
}


CREATE A CATEGORY

curl -s -X POST \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Getting Started",
    "description": "Articles for new users",
    "parent_id": "PARENT_CATEGORY_ID"
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/categories"

FieldRequiredDescription nameYesCategory name. descriptionNoCategory
description, shown on the help center. iconNoCustom SVG icon markup.
parent_idNoParent category ID — pass it to create a subcategory.
translationsNoTranslated name/description keyed by language code. Languages must
be configured on the center.

Returns 201 with the full updated categories list.

Tip

> When you create an article without a category_id, it is filed under the
> center's first category. Create your category structure first, then create
> articles directly into the right place.


UPDATE A CATEGORY

curl -s -X PATCH \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Updated name", "description": "Updated description" }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/categories/CATEGORY_ID"

Accepts name, description, icon, and translations. At least one field must be
provided. Returns the full categories list.


DELETE A CATEGORY

curl -s -X DELETE \
  -H "Authorization: Bearer $HC_API_KEY" \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/categories/CATEGORY_ID"

A category that still has articles assigned — including articles in its
subcategories — cannot be deleted. The API returns a category_has_articles error
listing the blocking article IDs, so you can reassign them first with the
metadata endpoint
[https://developers.help.center/article/1013-how-to-create-and-publish-help-articles-via-api]
(PATCH /articles/:articleId/metadata with a new category).


ENDPOINT REFERENCE

ActionMethodEndpointScope List
categoriesGET/v0/centers/:centerId/articles/categoriescontent.read Create
categoryPOST/v0/centers/:centerId/articles/categoriescontent.write Update
categoryPATCH/v0/centers/:centerId/articles/categories/:categoryIdcontent.write
Delete
categoryDELETE/v0/centers/:centerId/articles/categories/:categoryIdcontent.delete