Collections

List Collections

GET
/v2/collections
x-api-key<token>

Authenticate using API Key in request header

In: header

Query Parameters

parentCollectionName?string

Optional filter to list only collections under a specific parent collection path. For example, "customers" will return "customers", "customers.premium", "customers.premium.vip", etc.

collectionNameSearch?string

Optional substring search filter for collection names (case-insensitive). For example, "premium" will match "customers.premium", "products.premium", etc.

page?integer

Page number for pagination

Default1
Range1 <= value
limit?integer

Number of collections per page

Default50
Range1 <= value <= 100

Response Body

application/json

curl -X GET "https://api.bem.ai/v2/collections?parentCollectionName=customers&collectionNameSearch=premium"
{
  "collections": [
    {
      "collectionID": "cl_2N6gH8ZKCmvb6BnFcGqhKJ98VzP",
      "collectionName": "product_catalog",
      "itemCount": 150,
      "createdAt": "2024-10-20T15:30:00Z",
      "updatedAt": "2024-10-20T15:32:00Z"
    },
    {
      "collectionID": "cl_3M7hI9ALDnwc7CoGdHriLK09WaQ",
      "collectionName": "customers",
      "itemCount": 42,
      "createdAt": "2024-10-20T16:00:00Z",
      "updatedAt": "2024-10-20T16:15:00Z"
    },
    {
      "collectionID": "cl_4N8iJ0BMEoxd8DpHeIsjML10XbR",
      "collectionName": "customers.premium",
      "itemCount": 12,
      "createdAt": "2024-10-20T16:30:00Z",
      "updatedAt": "2024-10-20T16:45:00Z"
    }
  ],
  "page": 1,
  "limit": 50,
  "totalCount": 3,
  "totalPages": 1
}