Skip to main content

The Knowledge plugin's API

Under /api/v1/x/knowledge, 404 while the plugin is off; knowledge:read and knowledge:write. Guide: knowledge. An article's <id> takes its id or its key (KB-12).

Knowledge bases​

EndpointWhat
GET bases?orgId=&archived=yesThe knowledge bases you read: { bases: [{ id, orgId, name, description, audience, unitIds, portalIds, accountIds, accounts, public, owners, reviewers, archived, categories: [{ id, name, description, articles }], articles, may: { write, publish, settings } }] }.
GET options?orgId=What the settings pick from: the organization's units and portals. knowledge.settings.
POST bases{ orgId, name, description, audience, unitIds, portalIds, accountIds, public, ownerIds, reviewerIds }. audience: staff (with unitIds: only those units and below; empty: all staff), customers (on portalIds, empty: every portal; public: without signing in) or accounts (accountIds, at least one). Units, portals, accounts and people are of the organization (400 unknown_ref). knowledge.settings.
PATCH bases/<id>As for creating, and archived. A change of who reads it is audited as knowledge.audience_changed, with before and after.
DELETE bases/<id>Only without articles (409 has_articles).
POST bases/<id>/categories, PATCH …/categories/<categoryId>, DELETE …/categories/<categoryId>, PUT …/categories/order{ name, description }; { order: [ids] }. The knowledge base's owners and knowledge.settings. Deleting a category leaves its articles without one.

Articles​

EndpointWhat
GET articles?orgId=&baseId=&categoryId=&state=&owner=&review=due&pending=yes&serviceId=&ciId=&q=&page=&pageSize=Articles you read, recently changed first: published ones, and every state where you write. state: current (not retired, the default), all, or states (draft, in_review, published, retired); owner: me or an id; review=due: published with the review date passed; pending=yes: published with a newer version waiting; q: words in the title, summary, keywords or published text, or a key.
GET articles/suggest?q=&serviceId=&ciId=&orgId=Up to six published articles you read for the work in hand: matching the words of q (a case's subject, an incident's title), those about the service or CI first. { articles: [{ id, key, title, summary, knowledgeBase, audience, portalUrl }] }; portalUrl is the article's address on a portal, for customer knowledge.
POST articles/<id>/feedbackWas this helpful, on a published article: { helpful, comment }.
GET articles/count{ inReview, reviewDue, mine, published }.
GET report?days=&tz=&orgId=The Knowledge dashboard for the last days days (30 by default): published, reviewDue and inReview now; versionsPublished, newArticles, helpful, notHelpful and deflections in the period, and per day in daily; needsWork (most No answers, with the last comment), solving (most That solved it), mostRead and bases. knowledge.dashboard.
POST articlesVersion 1, a draft: { baseId, categoryId, title, summary, body (Markdown), keywords, serviceIds, ciIds, ownerId (you if left out), note }. knowledge.write.
GET articles/<id>?version=&view=yesThe article with shown (the version shown, with body and html): readers get the published version, writers the newest; version picks another (writers only). versions (writers: all; readers: the published one), may: { edit, submit, publish, review, retire, restore, delete }, needsReview and portalUrl (where customers read it, for a published article in customer knowledge). view=yes counts a view.
PATCH articles/<id>title, summary, body and keywords go to the newest version: a published article gets a new draft version; one in review goes back to draft. baseId moves it (audited as knowledge.article_moved), and categoryId, serviceIds, ciIds, ownerId change the article.
POST articles/preview{ body } → { html }: the Markdown as an article shows it.
POST articles/<id>/submit{ note }: the draft goes to review.
POST articles/<id>/publish, POST articles/<id>/return{ comment }. knowledge.publish, or an owner or reviewer of the knowledge base; when it has reviewers, never the version's writer or submitter (403 four_eyes). Publishing sets reviewBy a year ahead and is audited as knowledge.article_published.
POST articles/<id>/discardDiscards the draft of a published article.
POST articles/<id>/retire, POST articles/<id>/restore{ reason }; restore takes no body. As for publishing.
POST articles/<id>/reviewedStill right: the review date moves a year ahead. Its owner, and as for publishing.
DELETE articles/<id>A draft never published (400 published otherwise): its writer, and as for publishing.

On the portals​

Without a staff sign-in, as the contact signed in on the portal (if any). A knowledge base shows only as the guide's On the portal says; anything else is 404.

CallWhat it does
GET public/<portal slug>?q=&baseId=&categoryId=&locale=The portal's shell, bases the contact reads (with categories and how many articles), articles (published, most read first; searched by q), and more (signed out, with knowledge for signed-in contacts).
GET public/<portal slug>/articles/<KB-12>The article's published version (html), its knowledge base and category, and related ones. Counts a view.
GET public/<portal slug>/suggest?q=Up to five articles matching what the contact typed.
POST public/<portal slug>/articles/<KB-12>/feedback{ helpful, comment }, or { solved: true } (That solved it). From the portal's own page only (403 origin_not_allowed).

Webhook events​

knowledge.article_created, knowledge.article_submitted, knowledge.article_published, knowledge.article_returned and knowledge.article_retired, each with the article's id and key.

MCP tools​

Assistants read and write knowledge as the person, with the same rules as the app: readers see published articles only, and nothing is published without the knowledge base's review.

ScopeTools
knowledge:readlist_knowledge_bases, search_knowledge (words, a key, a knowledge base, a service or CI), get_article (by key or id, in Markdown), knowledge_report (the dashboard's figures, with knowledge.dashboard)
knowledge:writesave_article (a new article or the next version, as a draft), submit_article, publish_article (where you may publish)