---
title: "Update an existing custom field by its ID"
method: PUT
path: "/custom/fields/{customFieldId}"
tags: ["Custom Fields"]
---

# Update an existing custom field by its ID

`PUT /custom/fields/{customFieldId}`

## Path parameters

- `customFieldId` string, required

## Request body

- CustomFieldRequest
  - `name` string, required
  - `enabled` boolean, required
  - `required` boolean, required
  - `fieldType` 'text' | 'checkbox' | 'select', required
  - `validationRules` CustomFieldValidationRules — Optional validation rules for the custom field
    - `unique` boolean — If this field must be unique for every user in the environment
    - `regex` string — The regex pattern that the text field must match
    - `validOptions` CustomFieldValidValue[] — The dropdown options for the select field
      - `label` string, required
      - `key` string
    - `checkboxText` string — The text that will be displayed for the checkbox field
  - `position` number, required

## Response `200`

Custom field updated successfully

- CustomField
  - `id` string, required
  - `key` string, required
  - `name` string, required
  - `enabled` boolean, required — A flag indicating whether the custom field is active.
  - `required` boolean, required — A flag indicating whether the custom field is required.
  - `fieldType` 'text' | 'checkbox' | 'select', required
  - `validationRules` CustomFieldValidationRules — Optional validation rules for the custom field
    - `unique` boolean — If this field must be unique for every user in the environment
    - `regex` string — The regex pattern that the text field must match
    - `validOptions` CustomFieldValidValue[] — The dropdown options for the select field
      - `label` string, required
      - `key` string
    - `checkboxText` string — The text that will be displayed for the checkbox field
  - `position` number, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/dynamic/apis/dashboard-api.md) · [All operations](https://skmtc.net/dynamic/apis/dashboard-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dynamic/dashboard-api/revisions/aac826315d90/schema)
