[BETA] Update a knowledge base publication

Change a publication of your school's knowledge base so that students and the chatbot read your school's current information: correct a text, add a translation, move it to another category, change its audience or its cover, or hide it.

Partial update: only the fields sent change, at least one is required, and unknown fields are ignored. If a field is set to null → its value is reset (coverImageUrl only). The response names the fields applied in updatedFields. A publication never becomes a category.

Your school needs the API option and the knowledge base feature.

Languages

content lists the languages to write. Each item replaces the stored text of its language or adds it; the languages not sent stay. language is required when more than one item is sent and defaults to the school language otherwise; a language sent twice answers 400 DUPLICATE_IN_REQUEST. The resulting bodies must fit the resulting type: the HTML of a text publication is reduced to the editor allowlist and is limited to 65,535 bytes once reduced; a video or a link needs an http(s) URL in every language, so turning a text into a link while an HTML body is in place answers 400 VALIDATION_ERROR.

Audience and moves

audience replaces the audience as a whole: all (everyone), unauthenticated (the public part of your white-label app) or authenticated (the students of the app), restricted to groupIds or groupExternalReferenceIds for authenticated only. all and unauthenticated need the public white-label app (403 PUBLIC_AUDIENCE_REQUIRES_WHITE_LABEL); an unknown group answers 404 GROUP_NOT_FOUND and an archived one 409 ARCHIVED_GROUP_EXISTS.

A publication is never wider than its category: under an unauthenticated category it is unauthenticated, under an authenticated one it is authenticated and, when the category names groups, its groups are a non-empty subset of them. The rule is checked whenever audience or categoryId is sent, on the resulting audience and the resulting category (409 KNOWLEDGE_BASE_PARENT_VISIBILITY_CONFLICT); a publication made wider than its category in Edusign before this rule stays as it is until one of them is sent.

categoryId moves the publication into a category of your school, at order or last; the category it leaves closes the gap. order alone moves it among its siblings and shifts the items in between; a position beyond the last means last.

Cover

coverImageUrl gives the http(s) URL of a new cover: it is downloaded, checked, scanned and stored after the response, and the current cover stays until that succeeds. null removes the cover during the request; when the storage refuses, the request answers 502 KNOWLEDGE_BASE_COVER_DELETE_FAILED and nothing changes.

Chatbot

When your school has the campus chatbot and the publication is synced with it, the change is sent to the chatbot after saving; a failed send keeps the change, answers 200 and is repaired later by the reconciliation. Nothing is sent while the text the chatbot would read is under 10 characters. A synced publication keeps the text type while your school has the chatbot (409 KNOWLEDGE_BASE_CHATBOT_UNSUPPORTED_TYPE). The sync setting itself is not changed here.

hidden: true hides the publication from the student app. It does not remove it from the chatbot yet.

The checks run on the publication as the request reads it, and the change is saved only while its type, category, audience, chatbot sync and texts still read the same under the lock: when one of them changed meanwhile, the request answers 409 KNOWLEDGE_BASE_PUBLICATION_CONFLICT and nothing is saved, except a cover removal (coverImageUrl: null), which happens before that check and is not undone; read the publication again and send the change again.

Everything except the new cover is saved together, or not at all. A publication is found in your school only: an unknown or malformed id, another school's publication or a category answers 404 KNOWLEDGE_BASE_PUBLICATION_NOT_FOUND.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The identifier Edusign gave the category or the publication.

Body Params
string
enum

text: a page written in the editor, video: a video the app plays from its URL, link: a page the app opens from its URL.

Allowed:
content
array of objects
length ≤ 4

Languages to write. Each item replaces the stored language or adds it; the languages not sent stay. A language sent twice is refused with DUPLICATE_IN_REQUEST.

content
string
length ≥ 1

Moves the publication into this category of your school, at order or last. A publication as target answers 404 KNOWLEDGE_BASE_CATEGORY_NOT_FOUND.

integer
0 to 9007199254740991

The position among the items of the resulting category, from 0; the items in between shift by one. Beyond the last position means last.

audience
object

Replaces the audience as a whole. all and unauthenticated need the public white-label app.

boolean

true hides the publication from the student app.

length ≤ 2048

An http(s) URL of the new cover (JPEG, PNG or WebP, 10 MB at most), processed after the response. If set to null → the cover is removed.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json