AimableDocs
DocsAPI ReferenceRelease Notes
POST/v1/knowledge/collections/{collection_id}

Create Collection

Create a new collection (creates directory structure). The DB record is created separately; this endpoint only sets up the filesystem layout. Tenant ownership cannot be asserted here (the collection row does not exist yet), so we enforce: (a) a real authenticated session via get_principal_context, and (b) a valid UUID format so the collection_id cannot be used for path injection.

Path Parameters

NameTypeRequiredDescription
collection_idstringRequired

Headers

NameTypeRequiredDescription
X-API-KeystringOptional
Authentication
X-API-Key: ak.<key_id>.<secret>Authentication & errors →

Request

curl -X POST '/api/v1/knowledge/collections/{collection_id}' \
  -H 'X-API-Key: ak.<key_id>.<secret>'

Response

200

No response body documented

Error Responses