Logo White

Categories

Organize posts into primary and nested categories (parent_id).

GET/v1/categories

List categories

Retrieves all categories (with nested children) for the publication. Requires categories:read.

Request

curl https://api.bloghunch.com/v1/categories \
  -H "Authorization: Bearer {token}"

POST/v1/categories

Create a category

Creates a new category (optionally nested under parent_id). Requires categories:write.

Request

curl -X POST https://api.bloghunch.com/v1/categories \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Guides",
    "description": "Step-by-step technical tutorials"
  }'

Other category endpoints

  • Get category: GET /v1/categories/{idOrSlug} (categories:read)
  • Get posts in category: GET /v1/categories/{idOrSlug}/posts (categories:read)
  • Update category: PATCH /v1/categories/{id} (categories:write)
  • Delete category: DELETE /v1/categories/{id} (categories:write)