Collections
Operations tagged Collections in the public API.
/v1/knowledge/collections
Create a knowledge collection
Create a knowledge collection. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopeknowledge:write
curl -X POST https://api.agentency.com/v1/knowledge/collections \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"
-d '{
"name": "name",
"chatbot_id": 1,
"description": "description"
}'/v1/knowledge/collections/{id}
Update a knowledge collection
Update a knowledge collection. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopeknowledge:write
curl -X PATCH https://api.agentency.com/v1/knowledge/collections/{id} \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"
-d '{
"name": "name",
"description": "description",
"status": "status"
}'/v1/knowledge/collections/{id}
Delete a knowledge collection
Delete a knowledge collection. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopeknowledge:write
curl -X DELETE https://api.agentency.com/v1/knowledge/collections/{id} \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"/v1/knowledge/collections/{id}/datasets
Datasets knowledge collection
Datasets knowledge collection. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopeknowledge:read
curl -X GET https://api.agentency.com/v1/knowledge/collections/{id}/datasets \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"/v1/knowledge/collections/{id}/datasets
Add dataset knowledge collection
Add dataset knowledge collection. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopeknowledge:write
curl -X POST https://api.agentency.com/v1/knowledge/collections/{id}/datasets \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"
-d '{
"dataset_id": 1
}'/v1/knowledge/collections/{id}/duplicate
Duplicate knowledge collection
Duplicate knowledge collection. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopeknowledge:write
curl -X POST https://api.agentency.com/v1/knowledge/collections/{id}/duplicate \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"
-d '{
"name": "name"
}'/v1/knowledge/collections/auto_create
Auto create knowledge collection
Auto create knowledge collection. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopeknowledge:write
curl -X POST https://api.agentency.com/v1/knowledge/collections/auto_create \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"
-d '{
"chatbot_id": 1,
"chatbot_name": "chatbot_name"
}'/v1/knowledge/collections/{id}/datasets/{datasetId}
Remove dataset knowledge collection
Remove dataset knowledge collection. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopeknowledge:write
curl -X DELETE https://api.agentency.com/v1/knowledge/collections/{id}/datasets/{datasetId} \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"