githubEdit

Create Folders

Use Folders to organization by project, topic, or knowledge domain.

BlockBrain organizes documents within databases using hierarchical Folders that enforce access rights across tenants, users, and groups. The system aligns with bot/conversation sharing patterns and maintains strict tenant isolation.

Create a new folder

Using the _id from our last step Create a Database, we now start creating subfolders to organize documents. The root folder is the baseline Knowledgebase parentPath here.

Create Folder

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestringRequired
descriptionany ofOptional
stringOptional
or
nullOptional
knowledgeBasestringRequired
parentPathstringRequired
Responses
chevron-right
200

Successful Response

application/json
_idstringOptional
createdAtstring ยท date-timeOptional
modifiedAtstring ยท date-timeOptional
namestringRequired
pathstringOptionalDefault: root
knowledgeBasestringRequired
user_idany ofOptional
stringOptional
or
nullOptional
accessModestring ยท enumOptionalDefault: restrictedPossible values:
isShareAllany ofOptionalDefault: false
booleanOptional
or
nullOptional
descriptionany ofOptional
stringOptional
or
nullOptional
archivedAtany ofOptional
string ยท date-timeOptional
or
nullOptional
sourceTypeany ofOptional
string ยท enumOptionalPossible values:
or
nullOptional
post
/folder

When creating folders, we again get access to an _id property that can be used for further operations like moving or deleting folders. The path should be used as parentPath when creating more subfolders.

Delete a Folder

The delete method can either use one or several ids to remove folders inside of a Knowledgebase. Here we need to use our _id from the folder creation to delete a given folder again.

Remove Folder

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
knowledge_basestringRequired
Body
Responses
chevron-right
200

Successful Response

application/json
codeany ofOptional
integerOptional
or
nullOptional
keyany ofOptional
stringOptional
or
nullOptional
bodyany ofOptional
stringOptional
or
nullOptional
delete
/folder/{knowledge_base}/remove

Next Steps

Now that we have our folder structure set up, time to Upload Documents to DBs.

Last updated