Categories

Retrieve all categories

Changed on

Retrieve a paginated list of categories from the knowledge base. Supports filtering by knowledge base ID, parent category ID, language, and creation/update timestamps, as well as sorting.

get/cms/knowledge-base/2027-03-beta/categories

Request

  • Base URL: https://api.hubapi.com
  • URL: https://api.hubapi.com/cms/knowledge-base/2027-03-beta/categories
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://app.hubspot.com/oauth/authorize, token URL https://api.hubapi.com/oauth/v1/token, scopes: cms.knowledge_base.settings.read)
    • OAuth 2 (authorization code, authorization URL https://app.hubspot.com/oauth/authorize, token URL https://api.hubapi.com/oauth/v1/token, scopes: cms.knowledge_base.articles.publish)
    • OAuth 2 (authorization code, authorization URL https://app.hubspot.com/oauth/authorize, token URL https://api.hubapi.com/oauth/v1/token, scopes: cms.knowledge_base.articles.write)
    • OAuth 2 (authorization code, authorization URL https://app.hubspot.com/oauth/authorize, token URL https://api.hubapi.com/oauth/v1/token, scopes: cms.knowledge_base.articles.read)
    • OAuth 2 (authorization code, authorization URL https://app.hubspot.com/oauth/authorize, token URL https://api.hubapi.com/oauth/v1/token, scopes: cms.knowledge_base.settings.write)

Query parameters

afterstring

A pagination cursor. Pass the value from the previous response’s paging.next.after to retrieve the next page.

createdAfterstring date-time

Filter categories created after the specified date and time. Accepts an ISO-8601 timestamp (e.g., 2026-09-20T00:00:00Z) or a plain date (e.g., 2026-09-20).

createdAtstring date-time

Filter categories to those with this exact creation date and time. Accepts an ISO-8601 timestamp (e.g., 2026-09-20T00:00:00Z) or a plain date (e.g., 2026-09-20).

createdBeforestring date-time

Filter to categories created before the specified date and time. Accepts an ISO-8601 timestamp (e.g., 2026-09-20T00:00:00Z) or a plain date (e.g., 2026-09-20).

knowledgeBaseIdsstring[]

Filter categories by specific knowledge base IDs. Accepts multiple values, repeated as separate query parameters.

languagestring

Filter categories by a specific language. Accepts an ISO 639 language code (e.g., en, es), optionally with a region subtag (e.g., en-US).

limitinteger

The number of results to display per page. Default is 25; maximum is 100.

parentCategoryIdsstring[]

Filter categories by specific parent category IDs. Accepts multiple values, repeated as separate query parameters.

sortstring[]

Specify how to sort results. Accepts name, createdAt, or updatedAt; prefix a field with - for descending order (e.g., -createdAt). Defaults to createdAt descending (newest first).

updatedAfterstring date-time

Filter to categories updated after the specified date and time. Accepts an ISO-8601 timestamp (e.g., 2026-09-20T00:00:00Z) or a plain date (e.g., 2026-09-20).

updatedAtstring date-time

Filter categories to those with this exact update date and time. Accepts an ISO-8601 timestamp (e.g., 2026-09-20T00:00:00Z) or a plain date (e.g., 2026-09-20).

updatedBeforestring date-time

Filter to categories updated before the specified date and time. Accepts an ISO-8601 timestamp (e.g., 2026-09-20T00:00:00Z) or a plain date (e.g., 2026-09-20).

Response

successful operation

Example response

{
  "paging": {
    "next": {
      "after": "{ \"after\": \"Mg%3D%3D\" }",
      "link": "{ \"link\": \"https://api.hubapi.com/cms/knowledge-base/2027-03-beta/tags?after=Mg%3D%3D\" }"
    }
  },
  "results": [
    {
      "description": "{ \"description\": \"Articles to help you get started.\" }"
    }
  ]
}

Changes

  • 2027-03-beta2eff3dd6fefaRevision changes
    • ○

      the security scope cms.knowledge_base.settings.read was added to the endpoint's security scheme oauth2

    • ○

      the security scope cms.knowledge_base.settings.write was removed from the endpoint's security scheme oauth2

  • 2027-03-betaf542018e1a93Revision changes
    • ○

      the security scope cms.knowledge_base.settings.read was added to the endpoint's security scheme oauth2

    • ○

      the security scope cms.knowledge_base.settings.write was removed from the endpoint's security scheme oauth2