Content
Help articles, News posts, AI knowledge documents, and the folders, categories and tags that organise them
Wexio hosts two kinds of customer-facing content: a Help centre (articles in folders, tagged) and a News feed (posts in categories, tagged). Both are fully manageable over a key, which is what lets a partner publish a client's help centre from its own CMS.
Scopes: CONTENT_READ to read, CONTENT_MANAGE to change. The same pair covers knowledge documents, the text your AI assistants answer from. Knowledge documents through an API key need a Standard, Pro or Enterprise plan. Through MCP they need Pro or Enterprise.
These operations manage the content records. How the Help centre and News feed are rendered to visitors - and how the widget surfaces them - is covered in the Web Widget docs.
Help Articles
Reading
helpArticles(
integrationId: ID
status: HelpArticleStatus
locale: String
search: String
folderId: ID
recursive: Boolean
tagIds: [ID!]
sort: HelpArticleSort = CREATED_DESC
limit: Int
offset: Int
): PaginatedHelpArticles!
helpArticle(…): HelpArticleCONTENT_READ
| Argument | Type | Description |
|---|---|---|
integrationId | ID | Narrow to one widget's help centre. |
status | HelpArticleStatus | Filter by draft/published state. |
locale | String | One language's articles. |
search | String | Free-text search. |
folderId | ID | Articles in a folder. |
recursive | Boolean | Include articles in that folder's descendants. |
tagIds | [ID!] | Articles carrying any of these tags. |
sort | HelpArticleSort | Defaults to CREATED_DESC. |
limit / offset | Int | Offset pagination - unlike the rest of the API. |
Content paginates with limit/offset, not cursors. That is a third convention alongside limit/cursor and first/after elsewhere - see the conventions table.
Writing
createHelpArticle(input: CreateHelpArticleInput!): HelpArticle!
updateHelpArticle(…): HelpArticle!
createHelpArticleTranslation(…): HelpArticle!
publishHelpArticle(…): HelpArticle!
unpublishHelpArticle(…): HelpArticle!
deleteHelpArticle(…): Boolean!CONTENT_MANAGE
Authoring and publishing are separate steps: create or update the article, then publishHelpArticle when it should go live. unpublishHelpArticle pulls it back without deleting it.
createHelpArticleTranslation adds a locale to an existing article rather than creating a second, unrelated article - use it so translations stay linked.
Folders and Tags
helpFolders / helpFolder / helpFolderTree # CONTENT_READ
helpFolderCounts / helpFolderCountsBatch # CONTENT_READ
helpTags / helpTag # CONTENT_READ
createHelpFolder / updateHelpFolder / moveHelpFolder / deleteHelpFolder # CONTENT_MANAGE
createHelpTag / updateHelpTag / deleteHelpTag # CONTENT_MANAGEFolders are a tree. helpFolderTree returns the whole hierarchy in one call - use it instead of walking parents. moveHelpFolder re-parents a folder with its contents.
helpFolderCounts gives article counts for one folder; helpFolderCountsBatch does several at once, which is what you want for rendering a sidebar without N queries.
News
Reading
newsPosts(
integrationId: ID
status: NewsPostStatus
locale: String
search: String
categoryIds: [ID!]
tagIds: [ID!]
sort: NewsPostSort = CREATED_DESC
limit: Int
offset: Int
): PaginatedNewsPosts!
newsPost(…): NewsPostCONTENT_READ
Same filter and pagination shape as helpArticles, with categoryIds in place of folders.
Writing
createNewsPost(input: CreateNewsPostInput!): NewsPost!
updateNewsPost(…): NewsPost!
createNewsPostTranslation(…): NewsPost!
publishNewsPost(id: ID!): NewsPost!
scheduleNewsPost(id: ID!, scheduledFor: DateTime!): NewsPost!
unpublishNewsPost(…): NewsPost!
archiveNewsPost(…): NewsPost!
deleteNewsPost(…): Boolean!CONTENT_MANAGE
News has a richer lifecycle than Help:
| Operation | Effect |
|---|---|
publishNewsPost | Live now. |
scheduleNewsPost(id, scheduledFor) | Live at a future time - Wexio publishes it for you. |
unpublishNewsPost | Back to unpublished, still editable. |
archiveNewsPost | Retired but kept. Distinct from delete. |
deleteNewsPost | Gone. |
Prefer archiveNewsPost over deleteNewsPost for anything that was ever public - an archived post keeps its history and can be reasoned about later.
Categories and Tags
newsCategories / newsCategory / newsTags / newsTag # CONTENT_READ
createNewsCategory / updateNewsCategory / deleteNewsCategory # CONTENT_MANAGE
createNewsTag / updateNewsTag / deleteNewsTag # CONTENT_MANAGECategories are a flat list, not a tree - that is the difference from Help folders.
Knowledge Documents
Knowledge documents are the text an AI assistant answers from. A key can list them, write them, upload files as documents, and attach them to an assistant. For how they work in the dashboard, see the knowledge base guide.
knowledgeDocuments(input: GetCursorPaginatedInput, filter: KnowledgeDocumentsFilter, sort: KnowledgeDocumentsSort): KnowledgeDocumentPage!
knowledgeDocument(id: ID!): KnowledgeDocument!CONTENT_READ
Lists use cursor pagination (limit, default 20, and cursor). filter takes kind, statuses, enabled, assistantId, audienceKind, titleSource, descriptionSource, descriptionMissing and a case-insensitive title-prefix search. sort takes UPDATED_AT (default), CREATED_AT, TITLE or STATUS.
| Mutation | What it does |
|---|---|
createKnowledgeDocument | Create an authored document from title, body and optional description, assistantIds, enabled and audience. It is published as version 1, or kept as a draft with asDraft: true. |
createKnowledgeDocumentsFromMedia | Create documents from files you already uploaded. Up to 20 files per call; each result carries a document or an error.code (MEDIA_NOT_FOUND, UNSUPPORTED_TYPE or INVALID_INPUT). Pass asDraft: true to keep them as drafts. |
updateKnowledgeDocument | Change only the fields you pass. A change to title, description or body is published at once, as a new version. To keep it as a draft, use saveKnowledgeDocumentDraft. |
replaceKnowledgeDocumentFile | Swap the file of an uploaded document for another mediaId. The new text lands in the draft. Pass publish: true to publish it once the file has been read. |
reindexKnowledgeDocument | Rebuild the index of one document. |
deleteKnowledgeDocument | Delete a document. |
attachKnowledgeDocuments / detachKnowledgeDocuments | Add or remove up to 100 documents on one assistantId. |
CONTENT_MANAGE for all of them. To upload the files first, use createMedia or uploadMultipleMedia, which a key may call with either MESSAGES_SEND or CONTENT_MANAGE.
| Limit | Value |
|---|---|
| Title | 200 characters |
| Description | 300 characters |
Authored body | 100,000 characters |
Indexing runs in the background. A new or published document has status: INDEXING until it reaches READY; the other states are NO_TEXT, FAILED, and UNPUBLISHED for a document that was never published. Poll while indexingCount on the page is above zero. audience limits who the AI uses a document for: EVERYONE (default), SIGNED_IN, or FIELD_VALUES with a People fieldKey and a list of values.
Drafts and Versions
A document has a published version, which the AI reads, and at most one draft. Saving a draft does not change what the AI says. Publishing makes the draft the next version and indexes it. The last 50 versions are kept.
| Operation | What it does |
|---|---|
saveKnowledgeDocumentDraft(id, input) | Save title, description and body into the draft. Pass expectedDraftRev to refuse the save if the draft changed since you read it. |
publishKnowledgeDocument(id, expectedDraftRev) | Publish the draft as the next version. Expensive. |
discardKnowledgeDocumentDraft(id) | Throw the draft away. The published version stays. |
restoreKnowledgeDocumentVersion(id, versionNumber) | Load an older version into the draft. Publish it to make it live. |
revertKnowledgeDocumentTextToOriginal(id, expectedDraftRev) | For an uploaded file, drop the edited text and read the file's text into the draft again. Expensive. |
CONTENT_MANAGE for all of them. On a KnowledgeDocument, publishedVersion, hasUnpublishedChanges, textEditable and textLockReason (TOO_LARGE, EXTRACTING, NO_TEXT or NOT_CAPTURED) tell you where it stands. draft carries the draft's fields, its rev, and stale when a newer version was published after the draft started.
To read the history, use knowledgeDocumentVersions(documentId, input) for a cursor-paginated list and knowledgeDocumentVersion(documentId, versionNumber) for one version with its body. Each version has source (CREATE, EDIT, FILE_REPLACE, RESTORE, API or MIGRATION), publishedVia (MEMBER or API_KEY) and isLive. CONTENT_READ.
A refused change answers with extensions.reason, for example draftConflict, noDraft, draftNotReady, textNotEditable, textTooLong or versionNotFound. Branch on that value rather than on the message text.
A key reads assistants only through a summary (id, name, enabled). Prompts, models and integrations are not reachable. The create, update, replace, reindex, publish and revert mutations count as expensive operations in the rate limits.
Import from a Website
A document made from a web page has a web object with primaryUrl, autoSync, autoSyncDisabledByEdit, lastSyncedAt and lastCheckedAt. Each operation below returns a KnowledgeSyncRun that you poll.
| Operation | What it does |
|---|---|
startWebKnowledgePreview(input) | Read a site and suggest pages. url defaults to the organisation website. CONTENT_MANAGE. |
importWebKnowledge(input) | Create documents from a preview: previewRunId, selectedKeys and optional assistantIds. If you leave assistantIds out, the first import uses the system assistant. CONTENT_MANAGE. |
addKnowledgeFromUrl(input) | Add one page of the imported site by url, with optional assistantIds. CONTENT_MANAGE. |
refreshKnowledgeDocumentFromWebsite(id) | Check the page now. CONTENT_MANAGE. |
setKnowledgeDocumentAutoSync(id, enabled) | Turn the daily check on or off. Turning it on is refused on the Free plan. CONTENT_MANAGE. |
webKnowledgeOverview, knowledgeSyncRun(id), knowledgeSyncRuns(input) | Read the website, the active run, one run and the run history. CONTENT_READ. |
Publishing a Client's Help Centre
A typical partner flow, with one key holding CONTENT_READ, CONTENT_MANAGE and CHANNELS_MANAGE, acting on the client via X-Wexio-Org:
createWebIntegration- the client's widget. See Channels → Web widget.createHelpFolderfor each section of your CMS tree.createHelpArticleper article, thencreateHelpArticleTranslationfor each extra locale.publishHelpArticlewhen the client approves.- On every CMS change,
updateHelpArticle; usehelpFolderTreeto reconcile structure.
Content is per client org. A partner managing 50 clients publishes into each one separately via X-Wexio-Org - there is no shared content pool across children.