GraphQL API

Content

Help articles, News posts, 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.

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(…): HelpArticle

CONTENT_READ

ArgumentTypeDescription
integrationIdIDNarrow to one widget's help centre.
statusHelpArticleStatusFilter by draft/published state.
localeStringOne language's articles.
searchStringFree-text search.
folderIdIDArticles in a folder.
recursiveBooleanInclude articles in that folder's descendants.
tagIds[ID!]Articles carrying any of these tags.
sortHelpArticleSortDefaults to CREATED_DESC.
limit / offsetIntOffset 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_MANAGE

Folders 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(…): NewsPost

CONTENT_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:

OperationEffect
publishNewsPostLive now.
scheduleNewsPost(id, scheduledFor)Live at a future time - Wexio publishes it for you.
unpublishNewsPostBack to unpublished, still editable.
archiveNewsPostRetired but kept. Distinct from delete.
deleteNewsPostGone.

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_MANAGE

Categories are a flat list, not a tree - that is the difference from Help folders.

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:

  1. createWebIntegration - the client's widget. See Channels → Web widget.
  2. createHelpFolder for each section of your CMS tree.
  3. createHelpArticle per article, then createHelpArticleTranslation for each extra locale.
  4. publishHelpArticle when the client approves.
  5. On every CMS change, updateHelpArticle; use helpFolderTree to 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.

On this page