Skip to main content
GET
List Knowledge Bases
Read only Return all knowledge bases that belong to the authenticated workspace. Use this to populate a picker in your own UI, or to find the id of a knowledge base before attaching it to an agent.

When to use this

  • Pickers: list the knowledge bases an operator can attach to an agent.
  • ID lookup: find the kb_ ID by name before passing it in knowledge_base_ids on Create Agent or Update Agent.
  • Housekeeping: audit which knowledge bases exist before creating a new one, since names must be unique within a workspace.
The response contains a data.items array, each item with id, name, org_id, is_deleted, created_at and updated_at, and a data.meta object with totalItems, itemsPerPage, totalPages, and currentPage. The endpoint accepts page, limit, sortBy, and sortOrder; see API pagination for iteration examples.

Query parameters

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

page
integer
default:1

Page number, starting at 1. Must be a whole number; 0 is treated as 1.

Example:

1

limit
integer
default:20

Knowledge bases per page. Must be a whole number. Default 20; 0 returns 50 per page, values above 100 are treated as 100, and a negative value fails with 500.

Example:

20

sortBy
string
default:id

Column to sort by: id, name, org_id, is_deleted, created_at or updated_at. Default id. Any other value fails with 500.

Example:

"id"

sortOrder
string
default:ASC

Sort direction: ASC or DESC, in any case. Default ASC. Any other value fails with 500.

Response

Knowledge bases returned successfully.

success
enum<boolean>
required
Available options:
true
error
enum<boolean>
required
Available options:
false
statusCode
integer
required
Example:

200

message
string
required
Example:

"Success"

data
object
required
timestamp
string<date-time>
required