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
| Field | Type | Description |
|---|---|---|
| name | string | The name of the new collection. This field is required. |
| type | string | The type of the collection, either 'manual' or 'smart'. Defaults to 'manual'. |
| filter_rule | string | A rule used to automatically populate 'smart' collections. This field is optional. |
Response
| Status | Description |
|---|---|
| 201 | Collection successfully created. Returns application/json. |
| 400 | Invalid input data provided, such as a missing required field or an invalid collection type. Returns application/json. |