Documents

API for knowledge base documents

List documents

get

List a document on a given workspace and folder for a knowledge base.

Path parameters
workspaceIdstringRequired
Query parameters
limitinteger · min: 1 · max: 100Optional

Limits the project of results to return

Default: 10
pageTokenstring · max: 8000Optional

Pagination token that keeps of track of the current position in the list

reversebooleanOptional

Order in which to retrieve the results

Default: false
authorIdsstring · uuid[] | nullableOptional

Filter documents that were edited by at least one user from the list

tagsstring[] | nullableOptional

Filter documents that have at least one of the provided tags

folderPathsstring[] | nullableOptional

Paths of the folder. This can be used to narrow search to a specific folder

orderBystringOptional

Special ordering setting for the result documents

Example: createdAt:asc
statusstring · enum | nullableOptional

Filter documents based on status

Possible values:
titlestring | nullableOptional

Filter documents based on title

Responses
200
OK
application/json
Responseall of
and
get
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 document

post

Create a document on a given workspace and folder for a knowledge base.

Path parameters
workspaceIdstringRequired
Query parameters
asyncEmbeddingbooleanOptional

Indicates if embedding should be done asynchronously

Body
bodystringRequired

Contents of the document, can be markdown or plain text

folderIdstring · uuid | nullableOptional

ID of the folder to store the document

folderPathstring | nullableOptional

Path of the folder to store the document

statusstring · enumRequired

Status of the document. If you want your document to be visible and used by other systems, make it 'active'

Possible values:
tagsstring[]Optional

Tags can be used to label the content and used in search

titlestringRequired

Title of the document

Responses
201
Created
application/json
post
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 document

get

Get a document on a given workspace an folder for a knowledge base.

Path parameters
workspaceIdstringRequired
contentPathstringRequired
Responses
200
OK
application/json
get
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 documents

delete

Delete a folder on a given workspace and folder for a knowledge base.

Path parameters
workspaceIdstringRequired
contentPathstringRequired
Responses
204
Deleted
delete
DELETE /workspaces/{workspaceId}/content/documents/{contentPath} HTTP/1.1
Host: 
Accept: */*

No content

Update Document

patch

Update a document on a given workspace for a knowledge base.

Path parameters
workspaceIdstringRequired
contentPathstringRequired
Query parameters
asyncEmbeddingbooleanOptional

Indicates if embedding should be done asynchronously

Body
bodystringOptional

Contents of the document, can be markdown or plain text

folderIdstring · uuid | nullableOptional

ID of the folder to store the document

folderPathstring | nullableOptional

Path of the folder to store the document

statusstring · enumOptional

Status of the document. If you want your document to be visible and used by other systems, make it 'active'

Possible values:
tagsstring[]Optional
titlestringOptional

Title of the document

Responses
200
Updated
application/json
patch
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?