Documents
API for knowledge base documents
List a document on a given workspace and folder for a knowledge base.
Limits the project of results to return
10
Pagination token that keeps of track of the current position in the list
Order in which to retrieve the results
false
Filter documents that were edited by at least one user from the list
Filter documents that have at least one of the provided tags
Paths of the folder. This can be used to narrow search to a specific folder
Special ordering setting for the result documents
createdAt:asc
Filter documents based on status
Filter documents based on title
GET /workspaces/{workspaceId}/content/documents HTTP/1.1
Host:
Accept: */*
{
"results": [
{
"authors": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
}
],
"body": "text",
"createdAt": "2025-07-11T18:55:35.464Z",
"folderId": "123e4567-e89b-12d3-a456-426614174000",
"id": "123e4567-e89b-12d3-a456-426614174000",
"path": "text",
"slug": "text",
"status": "draft",
"tags": [
"text"
],
"title": "text",
"updatedAt": "2025-07-11T18:55:35.464Z"
}
],
"nextPageToken": "text"
}
Create a document on a given workspace and folder for a knowledge base.
Indicates if embedding should be done asynchronously
Contents of the document, can be markdown or plain text
ID of the folder to store the document
Path of the folder to store the document
Status of the document. If you want your document to be visible and used by other systems, make it 'active'
Tags can be used to label the content and used in search
Title of the document
POST /workspaces/{workspaceId}/content/documents HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 133
{
"body": "text",
"folderId": "123e4567-e89b-12d3-a456-426614174000",
"folderPath": "text",
"status": "draft",
"tags": [
"text"
],
"title": "text"
}
{
"authors": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
}
],
"body": "text",
"createdAt": "2025-07-11T18:55:35.464Z",
"folderId": "123e4567-e89b-12d3-a456-426614174000",
"id": "123e4567-e89b-12d3-a456-426614174000",
"path": "text",
"slug": "text",
"status": "draft",
"tags": [
"text"
],
"title": "text",
"updatedAt": "2025-07-11T18:55:35.464Z"
}
Get a document on a given workspace an folder for a knowledge base.
GET /workspaces/{workspaceId}/content/documents/{contentPath} HTTP/1.1
Host:
Accept: */*
{
"authors": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
}
],
"body": "text",
"createdAt": "2025-07-11T18:55:35.464Z",
"folderId": "123e4567-e89b-12d3-a456-426614174000",
"id": "123e4567-e89b-12d3-a456-426614174000",
"path": "text",
"slug": "text",
"status": "draft",
"tags": [
"text"
],
"title": "text",
"updatedAt": "2025-07-11T18:55:35.464Z"
}
Delete a folder on a given workspace and folder for a knowledge base.
DELETE /workspaces/{workspaceId}/content/documents/{contentPath} HTTP/1.1
Host:
Accept: */*
No content
Update a document on a given workspace for a knowledge base.
Indicates if embedding should be done asynchronously
Contents of the document, can be markdown or plain text
ID of the folder to store the document
Path of the folder to store the document
Status of the document. If you want your document to be visible and used by other systems, make it 'active'
Title of the document
PATCH /workspaces/{workspaceId}/content/documents/{contentPath} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 133
{
"body": "text",
"folderId": "123e4567-e89b-12d3-a456-426614174000",
"folderPath": "text",
"status": "draft",
"tags": [
"text"
],
"title": "text"
}
{
"authors": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
}
],
"body": "text",
"createdAt": "2025-07-11T18:55:35.464Z",
"folderId": "123e4567-e89b-12d3-a456-426614174000",
"id": "123e4567-e89b-12d3-a456-426614174000",
"path": "text",
"slug": "text",
"status": "draft",
"tags": [
"text"
],
"title": "text",
"updatedAt": "2025-07-11T18:55:35.464Z"
}
Was this helpful?