Skip to main content
GET
/
api
/
knowledge-bases
/
{kbId}
/
documents
List documents in a knowledge base
curl --request GET \
  --url http://localhost:3000/api/knowledge-bases/{kbId}/documents \
  --header 'Authorization: Bearer <token>'

Authorizations

Authorization
string
header
required

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

Path Parameters

kbId
string
required

Knowledge base ID

Query Parameters

page
number
default:1

Page number (1-based)

Required range: x >= 1
Example:

1

limit
number
default:20

Number of items per page

Required range: 1 <= x <= 100
Example:

20

Search term to filter results

Maximum string length: 100
Example:

"john"

sortBy
string

Field to sort by

Example:

"createdAt"

sortOrder
enum<string>
default:desc

Sort order

Available options:
asc,
desc
Example:

"desc"

documentGroup
string

Filter by document group

Example:

"product-docs"

status
enum<string>

Filter by document status

Available options:
uploading,
processing,
ready,
failed

Response

200

Paginated list of documents