FruxonDocs
ApiKnowledge bases

Lists the documents in a knowledge base, optionally filtered by a search term and status.

Returns the editable authoring documents for a knowledge base. The list includes drafts and archived documents because publish eligibility is controlled per document; pass `status` to narrow to one lifecycle state (for example `status=PUBLISHED` for the documents the next publish will index). Each document carries `lastChange`: the cause, accountable actor, writing agent and time of its newest revision, so a reviewer sees who changed it without opening its history. It is null for a document with no revision.

GET
/v1/tenants/{tenant}/knowledgeBases/{knowledgeBase}/documents
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

knowledgeBase*string

The knowledge base id.

Formatuuid
tenant*string

The tenant identifier

Query Parameters

PageSize?integer

The maximum number of items to return per page

Formatint32
PageToken.Skip?integer
Formatint32
PageToken.Cursor?string

Opaque pagination token returned by an external service. Pass it back unchanged rather than interpreting it as an offset.

orderBy?

Sort clause: title, locale, modifiedAt, or createdAt, each optionally followed by asc / desc. Defaults to title asc.

query?string

Optional search term. Matches a case-insensitive substring of the title or body (wildcards are matched literally), an exact tag, an exact source conversation id, or the document id.

status?string

Optional lifecycle filter (DRAFT, PUBLISHED, or ARCHIVED). Omit for every status.

Value in"UNSPECIFIED" | "DRAFT" | "PUBLISHED" | "ARCHIVED"
unpublished?boolean

When true, only the documents the next publish changes: new or edited since the last publish, or taken out of it (archived, or sent back to draft) while agents still get them. Combines with status and query. A deleted document is not listed, though the base still reports changesPending until its removal is published.

Response Body

curl -X GET "https://api.fruxon.com/v1/tenants/string/knowledgeBases/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents"
{
  "items": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "knowledgeBaseId": "00000000-0000-0000-0000-000000000000",
      "title": "string",
      "bodyMarkdown": "string",
      "status": "DRAFT",
      "locale": "string",
      "tags": [
        "string"
      ],
      "metadata": {},
      "sourceConversationIds": [
        "string"
      ],
      "lastReviewedAt": 0,
      "lastReviewedBy": "string",
      "createdAt": 0,
      "modifiedAt": 0,
      "contentRevision": 0,
      "liveVersion": {
        "title": "string",
        "bodyMarkdown": "string"
      },
      "lastChange": {
        "cause": "UNSPECIFIED",
        "actorId": "string",
        "agentId": "string",
        "at": 0
      }
    }
  ],
  "nextPageToken": "string",
  "totalCount": 0
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}