Collections
Create a Collection
Authorization
API Key x-api-key<token>
Authenticate using API Key in request header
In: header
Request Body
application/json
collectionName*string
Unique name/path for the collection. Supports dot notation for hierarchical paths.
- Only letters (a-z, A-Z), digits (0-9), underscores (_), and dots (.) are allowed
- Each segment (between dots) must start with a letter or underscore (not a digit)
- Segments cannot consist only of digits
- Each segment must be 1-256 characters
- No leading, trailing, or consecutive dots
- Invalid names are rejected with a 400 Bad Request error
Valid Examples:
- 'product_catalog'
- 'orders.line_items.sku'
- 'customer_data'
- 'price_v2'
Invalid Examples:
- 'product-catalog' (contains hyphen)
- '123items' (starts with digit)
- 'items..data' (consecutive dots)
- 'order#123' (contains invalid character #)
Response Body
application/json
curl -X POST "https://api.bem.ai/v2/collections" \ -H "Content-Type: application/json" \ -d '{ "collectionName": "product_catalog" }'{
"collectionID": "cl_2N6gH8ZKCmvb6BnFcGqhKJ98VzP",
"collectionName": "product_catalog",
"itemCount": 0,
"createdAt": "2024-10-20T15:30:00Z",
"updatedAt": "2024-10-20T15:30:00Z"
}