Knowledge base
Push documents from any system with the indexing API
An internal wiki, a ticket tool, your own file server: register a custom data source and push its documents, with who may read each one, so employees find them in search and answers.
When to use it
For a system Duaer has no connector for, your own program pushes the documents. Pushed documents work like any other source: they are found, used in answers with their source cited, and seen only by the people who may read them.
Register a source and get its token
- Each token writes only its own source. It cannot search or read anything. Duaer keeps only a hash of it.
- An owner or admin opens the project’s Knowledge base, goes to Knowledge sources, types a name under Custom data sources and selects Add source.
- The page shows the token (starting with dks_) and the API address, each with a Copy button. The token is shown this once, so save it now.
- Afterwards the page shows only "Token ends in …". If the token is lost, select Create new token: the old one stops working at once. After Revoke, the source cannot push until you create a new token.
- Remove deletes the source with every document and group it pushed. An organization has at most 20 custom sources.
Push a document
Send Authorization: Bearer <token> with every call. Pushing the same id again replaces the document.
curl -X PUT "https://<your Duaer address>/v1/knowledge/custom/documents/leave-policy" \
-H "Authorization: Bearer dks_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Leave policy",
"body": "Full-time employees have 15 days of annual leave...",
"url": "https://wiki.example.com/leave",
"author": "hr@example.com",
"updatedAt": "2026-10-01T08:00:00+08:00",
"readers": { "groups": ["HR"], "people": ["li.wen@example.com"] }
}'title: up to 512 characters. body: the text that is searched and answered from, up to 500,000 characters.
url (optional): where a result opens, http or https. author (optional): the author’s email. updatedAt (optional): when it changed, in ISO format.
The id is in the path: up to 200 characters, unique within the source.
Who may read
- readers.people: emails, up to 1,000. Emails match Duaer members, in any case.
- readers.groups: names of groups this source pushed, up to 100.
- readers.everyone: true lets every member of the organization read it.
- They can be combined. A document with no readers is found by nobody. People outside the organization find nothing.
Push a group
The source defines its own groups: push a group name with its members’ emails, and name the group on documents. When members change, who may read changes at once, without pushing the documents again.
curl -X PUT "https://<your Duaer address>/v1/knowledge/custom/groups/HR" \
-H "Authorization: Bearer dks_..." \
-H "Content-Type: application/json" \
-d '{ "members": ["hr@example.com", "li.wen@example.com"] }'The members you push replace the group’s members. A group has up to 5,000 members and a name of up to 200 characters.
A group belongs to the source that pushed it: groups with the same name in two sources are two groups. A group not pushed yet has no members.
All calls
- GET /v1/knowledge/custom: the source’s name, documents and groups.
- PUT /v1/knowledge/custom/documents/:id: creates or replaces one document.
- POST /v1/knowledge/custom/documents: creates or replaces up to 100 documents, with the body { "documents": [...] } and an id on each. If one is not valid, none is written.
- DELETE /v1/knowledge/custom/documents/:id: deletes one document.
- PUT /v1/knowledge/custom/groups/:name: sets a group’s members.
- DELETE /v1/knowledge/custom/groups/:name: deletes a group.
Errors and limits
- 401: no token, a wrong token or a revoked one.
- 400: a document or group is not valid; message names the field, such as documents.1.readers.people.0.
- 404: the document or group to delete is not there.
- 413: the call is over 16 MB. With long documents, send fewer per call.
- 429: more than 600 calls a minute from one IP address.
- Documents are found within seconds of a push; the vectors for meaning-based search are made 5 seconds after pushes stop.
- Documents you do not push again are kept. Delete them with DELETE.
Questions
Can groups synced through SCIM be readers?
No. Reader groups are the groups the source pushes, so nothing depends on an identity provider and the names match your system.
What if a token leaks?
Under Custom data sources, select Create new token or Revoke: the old token stops working at once. A token can only write its own source; it cannot read or search anything.
In this section
Knowledge sources you can connect to Duaer
Chat tools, drives and documents, CRM and service, mail and meetings, data warehouses: what each source reads and how to connect it, and how the Duaer bot works in each chat tool.
Knowledge basePermission-aware enterprise AI search: how Duaer keeps document access intact
Permission-aware enterprise AI search filters results by what each person may open in the source system, before any answer is written. Duaer follows the source’s permissions: a document shows up only for people who can open it where it lives, and answers use only those documents.
Knowledge baseAI answers with citations and no hallucination: how Duaer does it
To get AI answers with citations and without made-up facts, do three things: answer only from documents the person may read, mark which file each statement comes from, and give no answer when there is no source. The Duaer knowledge base answers this way by default.
Get startedRoll out Duaer to your company: the admin checklist
Eight steps take an organization from sign-up to employees asking Duaer every day: people and sign-in, knowledge sources, a check of members and answers, the chat bot, the employee portal, and what to turn on next.