Get Document Org
GET
/api/v1/ai/organization/knowledge/documents/{document_id}
Get a single org-scoped knowledge document's metadata.
path Parameters
document_idstring · required
Responses
Successful Response
createdAtstring · requiredcreatedBystring · requiredfilenamestring · requiredidstring · requirednumChunksinteger · requiredscopesstring[] · requiredupdatedAtstring · requiredupdatedBystring · required
isDisabledtitleworkspaceId
Patch Document Org
PATCH
/api/v1/ai/organization/knowledge/documents/{document_id}
Patch an org-scoped knowledge document's metadata.
path Parameters
document_idstring · required
Responses
Successful Response
createdAtstring · requiredcreatedBystring · requiredfilenamestring · requiredidstring · requirednumChunksinteger · requiredscopesstring[] · requiredupdatedAtstring · requiredupdatedBystring · required
isDisabledtitleworkspaceId
List Documents
GET
/api/v1/ai/workspaces/{workspace_id}/knowledge/documents
List knowledge documents accessible from the workspace (local + inherited + org-level).
path Parameters
workspace_idstring · required
query Parameters
scopessizeinteger · min: 1 · max: 2000Default: 50pageTokenmetaIncludestatequery
Responses
Successful Response
documentsobject[] · required
nextPageTokentotalCount
Upload Document
POST
/api/v1/ai/workspaces/{workspace_id}/knowledge/documents
Get Document
GET
/api/v1/ai/workspaces/{workspace_id}/knowledge/documents/{document_id}
Get a single knowledge document's metadata. Inherited and org-level docs are visible.
path Parameters
workspace_idstring · requireddocument_idstring · required
Responses
Successful Response
createdAtstring · requiredcreatedBystring · requiredfilenamestring · requiredidstring · requirednumChunksinteger · requiredscopesstring[] · requiredupdatedAtstring · requiredupdatedBystring · required
isDisabledtitleworkspaceId
Patch Document
PATCH
/api/v1/ai/workspaces/{workspace_id}/knowledge/documents/{document_id}
Patch a knowledge document's metadata (local docs only).
path Parameters
workspace_idstring · requireddocument_idstring · required
Responses
Successful Response
createdAtstring · requiredcreatedBystring · requiredfilenamestring · requiredidstring · requirednumChunksinteger · requiredscopesstring[] · requiredupdatedAtstring · requiredupdatedBystring · required
isDisabledtitleworkspaceId
Search Documents
GET
/api/v1/ai/workspaces/{workspace_id}/knowledge/search
Search the knowledge base using semantic similarity across the workspace ancestor chain.
path Parameters
workspace_idstring · required
query Parameters
querystring · requiredlimitinteger · min: 1Default: 10minScorenumber · min: 0 · max: 1Default: 0scopes
Responses
Successful Response
resultsobject[] · requiredstatisticsobject · requiredStatistics about the search results.