Skip to main content

Supported products

Use the knowledge base API to programmatically create and manage articles in your HubSpot knowledge base. You can also retrieve knowledge base settings, categories, and tags.

Retrieve knowledge bases

To retrieve all knowledge bases in your account, make a GET request to /cms/knowledge-base/2027-03-beta/knowledge-bases. The response will return a paginated list of knowledge bases, including each knowledge base’s id, name, domain, language, and URL.
To retrieve a specific knowledge base, append the knowledge base ID to the request URL: /cms/knowledge-base/2027-03-beta/knowledge-bases/{knowledgeBaseId}. The response will return the knowledge base details, including its name, language, domain, URL, and access settings.
The knowledgeBaseId returned in these responses is required when creating and filtering articles.

Create an article

To create a new article, make a POST request to /cms/knowledge-base/2027-03-beta/articles. New articles are created in a DRAFT state and are not publicly visible until published. In the request body, you’ll need to include knowledgeBaseId, title, and language.
categoryId stays in sync across all articles in a language group. See Manage article translations for details.
The response will return the created article, including its assigned id and url.

Retrieve articles

To retrieve a list of articles, make a GET request to /cms/knowledge-base/2027-03-beta/articles. Results are paginated (default 25, maximum 100 per page). When retrieving articles, you can include includeBody=false or includeTranslations=false query parameters to reduce the response size. Learn more about the available filtering and sorting parameters. The response will return a paginated list of articles and their details.
To retrieve a specific article, make a GET request to /cms/knowledge-base/2027-03-beta/articles/{articleId}. The response will return the article and its details.

Filter and sort articles

The list endpoint supports several query parameters for filtering and sorting:

Update an article

To update a live article, make a PATCH request to /cms/knowledge-base/2027-03-beta/articles/{articleId}. Only the fields included in the request body are updated. Omitted fields are left unchanged. In the request body, include the article fields you want to update.
accessType and archivedInDashboard can only be set on primary articles. Translations inherit these values automatically. See Manage article translations for details.
The response will return the updated article.

Manage article drafts

Published articles in HubSpot maintain a separate draft version that lets you stage changes before pushing them live. Use the draft endpoints to retrieve, edit, and publish draft content.

Retrieve a draft

To retrieve the draft version of an article, make a GET request to /cms/knowledge-base/2027-03-beta/articles/{articleId}/draft. The response will return the draft article, including its current content, state, and metadata. You can include includeBody=false or includeTranslations=false query parameters to reduce the response size.

Update a draft

To update draft content, make a PATCH request to /cms/knowledge-base/2027-03-beta/articles/{articleId}/draft. Include only the fields you want to update.
Please note: the translationOfId and archived fields cannot be set via this endpoint. They can only be set using the update article endpoint.
In the request body, include the draft fields you want to update.
The response will return the updated draft article.

Publish a draft

To push a draft live, make a POST request to /cms/knowledge-base/2027-03-beta/articles/{articleId}/draft/push-live. The response will return the updated article in its published state.

Unpublish articles

To unpublish a published article and revert it to a draft state, make a POST request to /cms/knowledge-base/2027-03-beta/articles/{articleId}/unpublish. The response will return the article with its state set to DRAFT.

Archive an article

To archive an article, make a PATCH request to /cms/knowledge-base/2027-03-beta/articles/{articleId}. In the request body, set one of archivedInDashboard or archived to true, depending on the type of archiving you want to perform.
  • Set archivedInDashboard to true to hide the article from the HubSpot dashboard. The article retains its current publish state (DRAFT or PUBLISHED) and can still be found via the Archived filter on the articles dashboard.
Any of the article’s language variants will also be updated automatically. You cannot set this field for language variants directly, as it’s inherited from the primary article.
  • Set archived to true to permanently delete the article. Any language variants will need to be deleted separately.
Please note: setting archived to true cannot be undone. Setting archived to false in a subsequent update request will fail.

Retrieve categories

Categories are organizational groups for knowledge base articles. The API supports read-only access to categories.
Please note: if a category translation is missing a name, that translation is considered incomplete. Publishing an article assigned to that category in that language will be blocked until the category translation has a name.
To retrieve all categories, make a GET request to /cms/knowledge-base/2027-03-beta/categories. You can filter by knowledgeBaseIds, parentCategoryIds, and language, and sort results by name, createdAt, or updatedAt. The response will return a paginated list of categories and their details.
To retrieve a specific category, make a GET request to /cms/knowledge-base/2027-03-beta/categories/{categoryId}. The response will return the category details, including its name, language, parent category (if applicable), and any translated variants.
If a category translation variant is missing a name, the translation is considered incomplete and articles cannot be published using that category.
Featured articles are displayed on the knowledge base homepage. To retrieve the featured articles for a category, make a GET request to /cms/knowledge-base/2027-03-beta/categories/{categoryId}/featured-articles. The response will return an array of featured article entries in their configured display order. Each entry includes the article ID, its position in the list, the category it’s featured in, and the subcategory ID if applicable.

Retrieve tags

Tags provide another way to organize and filter articles within a knowledge base. The API supports read-only access to tags. To retrieve all tags, make a GET request to /cms/knowledge-base/2027-03-beta/tags. You can filter by knowledgeBaseIds and language, and sort by name, createdAt, or updatedAt. The response will return a paginated list of tags and the knowledge bases they belong to.
To retrieve a specific tag, make a GET request to /cms/knowledge-base/2027-03-beta/tags/{tagId}. The response will return the tag details, including its name and the knowledge bases it belongs to.

Manage article translations

HubSpot knowledge base articles support multiple languages. You can create translated versions of an article by linking them to a primary article using the translationOfId field. Articles linked to the same primary article form a language group, and some fields are synced across the group automatically.

Create a translation

To create a translated version of an existing article, make a POST request to /cms/knowledge-base/2027-03-beta/articles and include translationOfId set to the id of the primary article. For example, the following request body would create a Spanish language variant of an article with the ID 222380235353.
The response will return the created translation article, including its id and a translationOfId field reflecting the linked primary article.

Synced fields

categoryId stays in sync across all articles in a language group:
  • On create: if a language variant omits categoryId, it inherits the value from the primary article.
  • On update: changing categoryId on any article in the group (primary or variant) propagates the change to all other articles in that group.
  • When changing translationOfId: the article’s categoryId is automatically re-synced to match the category of the newly linked primary article.
    • If that primary article has no category, the variant falls back to the category of another published translation of that primary instead.
    • If no published translations have an assigned category, the article’s existing categoryId is left unchanged.
    • If you want to set the category explicitly at the same time, include categoryId in the same request that changes the translationOfId.
The following fields can only be set on the primary article, and are synced across language variants:
  • accessType: the access level for the article (PUBLIC, SSO_LOGIN, or ACCESS_GROUP_MEMBERSHIP).
  • archivedInDashboard: whether the article is hidden in the HubSpot dashboard. See Archive an article.
Last modified on September 24, 2026