## Create an item `POST https://getkollek.com/api/collections/{collection}/items` Create an item within a collection. A hosted account on the free plan holds a limited number of items. Once it is full, this endpoint answers 402 with a message rather than creating anything, and keeps doing so until the account is unlocked. Read the current standing from the `items_used` and `item_limit` attributes of the account endpoint. A self-hosted instance has no limit and never returns 402. **Permissions:** Owners and editors. Viewers get a 404 response. ### Path parameters - `collection` (integer, required): The ID of the collection the item belongs to. ### Body parameters - `name` (string, required): The name of the item. Maximum 255 characters. - `description` (string, optional): A free text description of the item. Maximum 2000 characters. - `type_id` (integer, optional): The ID of the type of the item. Must be a type of your account. - `category_id` (integer, optional): The ID of the category the item sits in. Must belong to the collection. - `set_id` (integer, optional): The ID of the set the item is part of. Must be a set of the same collection as the item. - `series_id` (integer, optional): The ID of the series the item belongs to. A series is account-wide, so it only has to belong to your account, not to the item's collection. **Returns:** The created item object, or 402 when the account has reached its item limit. ### Example request ```bash curl https://getkollek.com/api/collections/1/items \ -X POST \ -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "name": "Amazing Spider-Man #1", "description": "Near mint condition.", "type_id": "3", "category_id": "1", "set_id": "1", "series_id": "1" }' ``` ### Example response `Status: 201` ```json { "data": { "type": "item", "id": "1", "attributes": { "name": "Amazing Spider-Man #1", "description": "Near mint condition.", "collection_id": "1", "type_id": null, "category_id": null, "set_id": null, "series_id": null, "created_at": 1752537600, "updated_at": 1752537600 }, "links": { "self": "https://getkollek.com/api/collections/1/items/1" } } } ```