## Update a custom field `PUT https://getkollek.com/api/collection-types/{collectionType}/custom-fields/{customField}` Update a custom field. Use position to reorder the fields: they are shown in ascending position order within their group, or within the type when the field is standalone. A field cannot be moved between groups. **Permissions:** Owners and editors. Viewers get a 404 response. ### Path parameters - `collectionType` (integer, required): The ID of the collection type the field belongs to. - `customField` (integer, required): The ID of the custom field. ### Body parameters - `name` (string, optional): The name of the field. Maximum 255 characters. - `field_type` (string, required): The kind of value the field holds. One of text, number, date, boolean, select or rating. A rating stores a whole number of stars from 1 to 5. - `options` (array of strings, optional): The choices of a select field. Blank entries are removed, and the parameter is ignored for the other field types. - `position` (integer, optional): The position of the field within its group, or within the type when the field is standalone, starting at 1. When omitted, the current position is kept. **Returns:** The updated custom_field object. ### Example request ```bash curl https://getkollek.com/api/collection-types/1/custom-fields/2 \ -X PUT \ -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "name": "Grade", "field_type": "select", "options": [ "NM", "VF", "FN" ], "position": 2 }' ``` ### Example response `Status: 200` ```json { "data": { "type": "custom_field", "id": "2", "attributes": { "name": "Grade", "field_type": "select", "options": [ "NM", "VF", "FN" ], "position": 2, "group_id": null, "created_at": 1752537600, "updated_at": 1752537600 }, "links": { "self": "https://getkollek.com/api/collection-types/1/custom-fields/2" } } } ```