Collections
Create and manage collections (groups of files) for organized querying.
Collections let you group files together for targeted querying. When you chat with a collection, only the files in that collection are searched.
Create a collection
POST https://api.knowbase.ai/api/v1/collections
Headers
Name
Type
Description
Authorization*
string
Bearer YOUR_API_TOKEN
Content-Type*
string
application/json
Request Body
Name
Type
Description
name*
string
Name of the collection
file_ids*
array
List of file ID strings to include
{
"name": "Q4 Reports",
"file_ids": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"b2c3d4e5-f6a7-8901-bcde-f12345678901"
]
}Response (201: Created)
List all collections
GET https://api.knowbase.ai/api/v1/collections
Response (200: OK)
Get collection details
GET https://api.knowbase.ai/api/v1/collections/{collection_id}
Returns the collection with its files.
Delete a collection
DELETE https://api.knowbase.ai/api/v1/collections/{collection_id}
Deletes the collection. The files inside are NOT deleted -- they remain in your library.
Response (200: OK)
Example: Create and query a collection
Last updated