---
title: "Update Custom Field"
description: "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)

```bash
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 Request` when the body fails validation (unknown `fieldType`, `name` over 100 characters, more than 50 `options`)
- `403 Forbidden` when your role is not `admin`
- `404 Not Found` when the field does not exist in your organization

## Response

Returns the updated custom field object. See [Error Codes](/api/error-codes-and-known-pitfalls) for error responses.
