Welcome to the eGain Knowledge Hub Content Manager API Guide. The Content Manager API enables enterprises to author, organize, import, and validate knowledge content in the knowledge base. It provides programmatic access to articles, folders, topics, prompt templates, and bulk import operations used by authors and knowledge managers. Built on OAuth 2.0 authentication, the API ensures secure, scoped, and role-aware access for users with a Knowledge + AI license. Typical callers hold the Author or Knowledge Base Manager role, or a custom role with the matching resource action. These APIs are subject to per-endpoint rate limits; see Usage Plans & Rate Limits.
The API covers these operations:
- Create, retrieve, and edit articles, including article content, attachments and article metadata.
- Check out articles for editing, and retrieve published or latest versions as needed.
- Publish articles after authoring edits are complete.
- Create and maintain the folder tree used to organize knowledge content.
- Create, retrieve, edit, and delete manual topics. Topics generated from folders can be retrieved and their articles follow the folder.
- Get and edit the article order within a topic.
- Bulk-import knowledge content from Amazon S3 buckets or SFTP servers.
- Validate content structure, format, and compliance before importing into production.
- Monitor, pause, resume, cancel, and schedule import jobs, including validation hooks.
- Legacy Knowledge Migration: Import large volumes of content from external sources into eGain using the documented import format, reducing time spent on manual authoring.
- Scheduled Bulk Updates: Run regular content updates from Amazon S3 or SFTP, including off-peak scheduled imports, so production content stays current.
- Pre-Production Validation: Validate content against structure, language, and business rules before a production import, catching issues without changing existing data.
- Knowledge Structure Authoring: Create and maintain folders, topics, and articles programmatically.
- Programmatic Edit and Publish: Check out an article, save edits, and publish the updated version through a sequence of API calls.
- Prompt Template Access: Retrieve department and language-specific prompt templates used in authoring and AI-assisted workflows.
Authoring goals often require calling multiple APIs in a specific order. The examples below use Content Manager v4 endpoints. For bulk structure and content, prefer the Ingestion API.
- Create a root-level folder with
POST /foldersand an explicitdepartment.idin the request body. Save the folder ID from theLocationresponse header. Each folder auto-creates a matching "Topics From Folders" topic. - Create articles in that folder with
POST /articles, using the folder ID. Newly created articles start checked out to the caller.
To attach files or publish, see Edit and publish below. After article creation, you already hold the lock, so the first publish does not need checkout.
- Create a top-level topic with
POST /topicsanddepartment.idin the request body. To create under an existing topic instead, supplyparent.id. Save the topic ID from theLocationresponse header and theETagresponse header. You can include initiallinks(rel: article, article self-link inhref) on create if the articles are already known. - Get the topic with
GET /topics/{topicIDs}?$lang=...to confirm it and refresh theETagresponse header before edits. - Add existing articles with
PATCH /topics/{topicIDs}usinglinks(rel: article) and the topicIf-Matchrequest header. To associate from the article side instead, usePATCH /articles/{articleIDs}withrel: topic. Useunlinkson edit to remove articles from the topic. - Set article order with
GET /topics/{topicIDs}/articleorderto read pinned top and bottom lists, thenPATCH /topics/{topicIDs}/articleorderto pin articles to the top or bottom. Send the topicIf-Matchrequest header from a prior GET or POST.
- Get the latest version with
GET /article/{articleID}?versionSelector=latest. Uselatestto fetch the draft version you can edit, notpublished. Save theETagresponse header. InspectlockedByin the response body before you plan an edit. - Check out with
PUT /articles/{articleIDs}/checkoutif you do not already hold the lock. If another user holds it, the API returns409 Conflict. - Preupload an attachment. Attachments and images must be uploaded before they are referenced; Content Manager does not accept raw file bytes in the article payload. Pre-upload with the File Manager
Generate URL to upload a fileAPI (POST /assets/preupload), withapplicationrequest body parameter set toarticle. For attachments, setisInlinerequest body parameter tofalse. Send the file bytes to the returneduploadUrl, then provide returnedfileUploadIdinversions[].attachmentsrequest body parameter on the next ArticlePATCH. For uploading inline images, setisInlinetotrueand then includefileUploadIdin the image tag in the article'scontentin the next ArticlePATCH. - Publish with
PATCH /articles/{articleIDs}?operation=publish, including any attachment or content changes in that request.- Send the saved
ETagin theIf-Matchrequest header so you are publishing the version you retrieved. After each successful PATCH, use the newETagresponse header before the next edit or publish. - Use
operation=editto save and stay checked out, oroperation=checkinto save and release the lock without publishing.
- Send the saved
- Delete with
DELETE /folders/{folderIDs}. The folder must be empty, or passdeleteUnreferencedArticles=true. If the folder is referenced as a topic in a portal, passdeleteIfUsedInPortal=true. - Check job status. Deletion is asynchronous: a
202 Acceptedresponse includes aLocationheader. Poll Get Async Job Status at that URL (core/infomgr/v4/async/job/{jobID}).
Secure Access
- Applications authenticate using OAuth 2.0 with Content Manager
readormanagescopes. Authoring operations also support on-behalf-of user scopes. - Logged-in users must have a Knowledge + AI license. Operations require the Author or Knowledge Base Manager role, or a custom role with the matching resource action.
- Applications authenticate using OAuth 2.0 with Content Manager
Folder and Topic Structure
- Create, edit, retrieve, and delete folders to organize knowledge content.
- Create topics at department level or under a parent topic. Retrieve topics, including topics generated from folders.
- Get and edit the article order for a topic.
Article Authoring
- Create articles in a folder; newly created articles start in the checked-out state.
- Retrieve an article by ID with content, choosing published or latest draft.
- Retrieve multiple articles by ID without content (summary and requested attributes).
- Check out articles for editing, save changes, and publish when ready.
Import and Validation
- Validate content before import to check structure, format, language support, and business rules.
- Create import jobs from supported data sources (Amazon S3 and SFTP).
- Configure validation hooks, then pause, resume, or cancel jobs as needed.
Monitor and Iterate
- Check import job status and access detailed logs.
- Use the import health endpoint to confirm the import service is available.
- Retrieve prompt templates filtered by department and language.