## Create a collection type `POST https://getkollek.com/api/collection-types` Create a collection type. Add custom fields to it with the custom fields endpoints, and link it to collections with the sync endpoint below. **Permissions:** Owners and editors. Viewers get a 404 response. ### Body parameters - `name` (string, required): The name of the type. Maximum 255 characters. - `color` (string, optional): The color of the type as a six-digit hex code, such as #fb923c. Default: `#6B7280`. **Returns:** The created collection_type object. ### Example request ```bash curl https://getkollek.com/api/collection-types \ -X POST \ -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "name": "Comics", "color": "#fb923c" }' ``` ### Example response `Status: 201` ```json { "data": { "type": "collection_type", "id": "1", "attributes": { "name": "Comics", "color": "#fb923c", "created_at": 1752537600, "updated_at": 1752537600 }, "links": { "self": "https://getkollek.com/api/collection-types/1" } } } ```