Skip to main content

Knowledge Base Collections

Returns collections and paginated published article summaries for the board associated with your API key. A read-only key is sufficient; SSO headers are not required. See Authentication for shared setup instructions.

Query

query KnowledgeBaseCollections(
$cursor: String
$limit: Int = 15
$sort: KnowledgeBaseArticleSort = CREATED_DESC
$filter: KnowledgeBaseArticleFilter
$includeCount: Boolean! = false
$includeUntagged: Boolean! = false
) {
board {
id
knowledgeBaseTags {
id
boardId
name
color
description
articles(cursor: $cursor, limit: $limit, sort: $sort, filter: $filter) {
hasMore
cursor
totalCount @include(if: $includeCount)
nodes {
id
boardId
path
title
datePublished
dateUpdated
authors {
name
}
}
}
}
knowledgeBaseUntaggedArticles(
cursor: $cursor
limit: $limit
sort: $sort
filter: $filter
) @include(if: $includeUntagged) {
hasMore
cursor
totalCount @include(if: $includeCount)
nodes {
id
boardId
path
title
datePublished
dateUpdated
}
}
}
}

Fields and arguments

The board query exposes these knowledge base fields:

FieldTypeDescription
knowledgeBaseTags[KnowledgeBaseTag!]!Collections in their configured display order.
knowledgeBaseUntaggedArticlesKnowledgeBaseArticlesPayload!A page of published articles without a collection. Accepts the same arguments as a collection's articles field.

Collection

FieldTypeDescription
idID!Collection identifier.
boardIdID!Identifier of the board selected by the API key.
nameString!Collection name.
colorStringOptional collection color.
descriptionStringOptional collection description.
articlesKnowledgeBaseArticlesPayload!A page of published articles in this collection.

Article page arguments

Both KnowledgeBaseTag.articles and Board.knowledgeBaseUntaggedArticles accept:

ArgumentTypeDefaultDescription
cursorStringOmittedCursor returned by the same group's previous page.
limitInt15Articles per group, clamped to the range 1โ€“50.
sortKnowledgeBaseArticleSortCREATED_DESCArticle sort order.
filterKnowledgeBaseArticleFilterOmittedPublished title and article update-time filters.

Article page

FieldTypeDescription
nodes[KnowledgeBaseArticle!]!Published article summaries on this page.
hasMoreBoolean!Whether another page exists for this group.
cursorStringNext-page cursor, or null when no further page exists.
totalCountInt!Matching published articles before pagination. Computed only when selected.

Article summary

FieldTypeDescription
idID!Article identifier.
boardIdID!Article's board identifier.
pathString!Relative article path, such as /getting-started.
titleString!Title from the published revision.
datePublishedDateTime!Article publication time.
dateUpdatedDateTime!Article record's last update time, which may include newer draft edits.
authors[KnowledgeBaseAuthor!]!Authors with the board's public identity settings applied.

Each author exposes id: ID!, name: String!, color: String, and image: KnowledgeBaseAuthorImage. The optional image exposes url: String!.

Pagination and filters

Each collection and the untagged group have their own page. Pass a group's returned cursor unchanged to load its next page. That cursor advances only its own group; other groups return their first page. Append only the requested group's results.

Keep the same sort and filters while loading subsequent pages. When either changes, omit the cursor to start from the first page.

The supported sorts are CREATED_DESC, CREATED_ASC, UPDATED_DESC, UPDATED_ASC, TITLE_ASC, and TITLE_DESC. Title sorting uses the published title.

Filter fieldTypeDescription
titleStringCase-insensitive substring of the published title.
updatedAfterDateTimeInclude articles updated at or after this time.
updatedBeforeDateTimeInclude articles updated before this time.

Update-time filters use the article's dateUpdated, including draft edits to an already-published article.

Visibility

Only enabled, publicly readable knowledge bases with knowledge base subscription access are returned. Disabled, private, password-protected, or expired knowledge bases return an empty collection list and an empty untagged page. SSO headers do not override these restrictions.

Articles must be published with a publication date at or before the request time. Titles come from the published revision, even when a newer draft exists. This API returns summaries; article bodies are unavailable. Authors use the board's public name and image privacy settings.

Collections follow the board's configured display order, including empty collections.