Drafts

Update the draft version of a specific knowledge base article. This endpoint allows you to modify the draft content of an article, including its title, body, and other properties. Use this endpoint to stage changes to an article before it is published live.

patch/cms/knowledge-base/2027-03-beta/articles/{articleId}/draft

Request

  • Base URL: https://api.hubapi.com
  • URL: https://api.hubapi.com/cms/knowledge-base/2027-03-beta/articles/{articleId}/draft
  • 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.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.settings.write)

Path parameters

articleIdstring required

The unique identifier of the article whose draft is to be updated.

Request body

accessGroupIdsobject required

The IDs of the access groups permitted to view the article. Used when accessType is ACCESS_GROUP_MEMBERSHIP.

accessTypeobject required

The access level of the article: PUBLIC, ACCESS_GROUP_MEMBERSHIP, or SSO_LOGIN.

archivedInDashboardobject required

The visibility state for this article in the dashboard.

bodyobject required

The article’s HTML content.

categoryIdobject required

The ID of the category the article belongs to.

metaDescriptionobject required

A brief description of the article, used for SEO.

pathobject required

The URL path segment for the article. This is combined with the knowledge base’s domain to form the article’s full URL (see the URL field on the response).

subtitleobject required

The subtitle of the article.

tagIdsobject required

The IDs of tags associated with the article.

titleobject required

The title of the article.

Response

successful operation

accessGroupIdsstring[] required

The IDs of the access groups that have access to the article. Used when accessType is ACCESS_GROUP_MEMBERSHIP.

accessType'ACCESS_GROUP_MEMBERSHIP' | 'PUBLIC' | 'SSO_LOGIN' required

The access level for the article: PUBLIC, SSO_LOGIN, or ACCESS_GROUP_MEMBERSHIP.

archivedInDashboardboolean required

A boolean indicating whether the article is archived in the dashboard.

bodystring

The article’s HTML content. Only included when the request’s includeBody query parameter is true (which is the default value for the query).

categoryIdstring

The ID of the category this article belongs to.

createdAtstring date-time required

The date and time when the article was created, in ISO 8601 format.

createdByUserIdstring

The unique identifier of the user who created the article.

idstring required

The unique identifier for the knowledge article.

initialPublishedAtstring date-time

The date and time the article was first published, in ISO 8601 format. Absent if the article has never been published.

knowledgeBaseIdstring required

The unique identifier of the knowledge base to which this article belongs.

languagestring required

The article’s language, as an ISO 639 code (e.g. en).

metaDescriptionstring

A brief description of the article, used for SEO.

pathstring required

The URL path segment for the article. Combined with the knowledge base’s domain, this forms the URL field.

positioninteger

The position of the article within its category.

publishedAtstring date-time

The date and time the article was last published, in ISO 8601 format. Absent if the article has never been published.

state'DRAFT' | 'PUBLISHED' required

The article’s state: either DRAFT or PUBLISHED.

subcategoryIdstring

The subcategory this article belongs to.

subtitlestring

The subtitle of the knowledge article.

tagIdsstring[] required

The IDs of the tags associated with the article.

titlestring required

The title of the knowledge article.

translationOfIdstring

The ID of the article this is a translation of.

translationsobject

A summary of the article’s translations, keyed by language code. Only included when the request’s includeTranslations query parameter is true (which is the default value for the query).

updatedAtstring date-time required

The date and time when the article was last updated, in ISO 8601 format.

updatedByUserIdstring

The unique identifier of the user who last updated the article.

urlstring required

The full URL of the article.

Changes

  • 2027-03-beta2eff3dd6fefaRevision changes
    • ○

      the security scope cms.knowledge_base.articles.publish 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.articles.publish 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