Hubspot Knowledge Base API

scottd

It appears from the API Docs and searching the Dev forum that this API is available but not documented.  It also appears according to the article below to not allow access to the content itself but rather a link.  We would move our glossary, blog and release notes to Hubspot potentially if this API were more robust.  We currently use contentful to manage content and provide API access to it.  

 

https://integrate.hubspot.com/t/knowledge-base-articles-api-for-search-and-get-content/11428

47 Kommentare
MikaelFurst
Mitglied

Have there really been no updates on the Knowledge Base API? Five years is quite a long time, especially considering how frequently it's been requested.

mffap
Mitglied

This is really required for us to move content over. The KB can't be customized so it makes sense within our website, we want to pull just the content and handle display ourselves while using KB content for support flows in Service Hub.

ClaireBIGENIUS
Mitwirkender/Mitwirkende

+1 how is it possible that we can access everything except the knowledge base with the hubspot API!

MarcoHuber
Teilnehmer/-in

Guys, seriously?

Your last official statement on this was in 2020, acknowledging it's a relevant topic. Since then—nothing.
This idea now has over 200 upvotes and clearly addresses a critical need for many users.


Please re-evaluate your priorities.

This isn’t just a nice-to-have—it’s essential functionality that your users have been requesting for years.

PHadfield
Mitglied

One vote here

AlexHub
Mitglied

This is very critical as we don't want to make the content public but we can't use the widget to show private content by SSO due to this bug...

TGrosser
Mitglied

Just putting this here, because I haven't found it immediately, and these posts are still unresponded to:

You can, at least, read the entire Knowledge Base using the HubSpot GraphQL tool:

 

# ---------- GraphQL Queries ----------

LIST_ARTICLES_QUERY = """
query PublishedKBArticlesNewestFirst($limit: Int!, $offset: Int!) {
  KB {
    knowledge_article_collection(
      limit: $limit
      offset: $offset
      filter: { hs_published_at__null: false }
      orderBy: [hs_published_at__desc]
    ) {
      items {
        hs_id
        hs_name
        hs_path
        hs_published_at
      }
    }
  }
}
"""

ARTICLE_DETAIL_QUERY = """
query ArticleForExport($id: String!) {
  KB {
    knowledge_article(uniqueIdentifier: "hs_id", uniqueIdentifierValue: $id) {
      id: hs_id
      title: hs_name
      subtitle: hs_summary
      path: hs_path
      lang: hs_language
      raw_format: hs_body
      published_at: hs_published_at
      updated_at: hs_updated_at
    }
    knowledge_base_collection(limit: 1, offset: 0) {
      items {
        source: hs_name
        domain: hs_domain
        kb_path: hs_slug
      }
    }
  }
}
"""

May not solve everyone's problem, but solved mine.