Trillet AI logo

List Knowledge Bases

Retrieve all knowledge bases for a workspace.

GEThttps://api.trillet.ai/v1/api/knowledgebase

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Response

A plain array of every knowledge base in the workspace (not wrapped in a data object), with no pagination. Each item has these fields:

_idstring

Unique identifier for the knowledge base.

namestring

Name of the knowledge base.

descriptionstring

Description of the knowledge base, if one was given.

workspaceIdstring

Workspace ID associated with the knowledge base.

isSMBboolean

true for a Basic knowledge base (the agent reads its text in full rather than searching an index), false for a standard one.

filesarray

Uploaded files plus, if set, the text entry. At most 5 entries.

textContentstring

The knowledge base's text, if any was set with Add Text.

usedInPathwaysarray

Legacy field, usually empty. Use Get Knowledge Base Usage to see which flows use the knowledge base.

createdAtstring

Timestamp when the knowledge base was created.

updatedAtstring

Timestamp when the knowledge base was last updated.

Errors

StatusBodyWhen
400{"message": "X-Workspace-ID header is required"}No x-workspace-id
500{"message": "Failed to retrieve knowledge bases"}Anything else
[
  {
    "_id": "a4a4a4a4a4a4a4a4a4a4a4a4",
    "name": "Product Documentation",
    "description": "All product-related documentation and FAQs",
    "workspaceId": "d1d1d1d1d1d1d1d1d1d1d1d1",
    "isSMB": false,
    "files": [
      {
        "_id": "a7a7a7a7a7a7a7a7a7a7a7a7",
        "filename": "product-guide.pdf",
        "key": "workspaces/d1d1d1d1d1d1d1d1d1d1d1d1/knowledge-bases/a4a4a4a4a4a4a4a4a4a4a4a4/1761735600000-product-guide.pdf",
        "url": "https://example-bucket.s3.amazonaws.com/workspaces/d1d1d1d1d1d1d1d1d1d1d1d1/knowledge-bases/a4a4a4a4a4a4a4a4a4a4a4a4/1761735600000-product-guide.pdf",
        "mimetype": "application/pdf",
        "size": 1048576,
        "isText": false,
        "uploadedAt": "2026-10-29T10:00:00.000Z"
      }
    ],
    "usedInPathways": [],
    "createdAt": "2026-10-29T09:00:00.000Z",
    "updatedAt": "2026-10-29T10:00:00.000Z"
  }
]

Last updated on