Skip to main content

POST /api/collections/

Create a new collection. Expects JSON with name (required) and optional type (manual|smart) and filter_rule.

Creates a new collection based on the provided data. The collection can be manual or smart, with an optional filter rule.

Endpoint

POST /api/collections/

Request Body

FieldTypeDescription
namestringThe name of the new collection. This field is required.
typestringThe type of the collection, either 'manual' or 'smart'. Defaults to 'manual'.
filter_rulestringA rule used to automatically populate 'smart' collections. This field is optional.

Response

StatusDescription
201Collection successfully created. Returns application/json.
400Invalid input data provided, such as a missing required field or an invalid collection type. Returns application/json.