Custom fields
Update Custom Field
Updates a custom field definition. All fields are optional.
PATCH /api/custom-fields/:id
Requires the admin role (or a global admin). Editors and read-only users receive 403.
Request Body (all optional)
| Field | Type | Description |
|---|---|---|
name | string | Display name, 1 to 100 characters |
fieldType | string | One of text, number, email, url, select |
isRequired | boolean | Whether the field is required |
displayOrder | number | Sort order, integer 0 to 10000 |
options | string[] | Options for the select type, max 50 entries of max 100 characters each |
placeholder | string|null | Placeholder text, max 200 characters |
helpText | string|null | Help text, max 500 characters |
showInTable | boolean | Show in table views |
isActive | boolean | Soft delete (set to false) |
Example (cURL)
curl -X PATCH "$BASE_URL/api/custom-fields/1" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "Environment", "options": ["production", "staging", "development", "qa"] }'Common errors
400 Bad Requestwhen the body fails validation (unknownfieldType,nameover 100 characters, more than 50options)403 Forbiddenwhen your role is notadmin404 Not Foundwhen the field does not exist in your organization
Response
Returns the updated custom field object. See Error Codes for error responses.