Update User Field userfieldconfig.update

Choose a tool for developing with an AI agent:

  • use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
  • use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation

Scope: userfieldconfig, module scope from moduleId (for example, crm)

Who can execute the method: a user with permission to modify object settings in the moduleId module (for crm — permission "Allow to modify settings")

The userfieldconfig.update method updates the settings of an existing user field.

Method Parameters

Required parameters are marked with *

Name
type

Description

moduleId*
string

Identifier of the module where the field is located

id*
integer

Identifier of the user field settings

field
object

Object with new field settings (detailed description)

Parameter field

Name
type

Description

xmlId
string

External identifier of the field

sort
integer

Sort index

mandatory
boolean

Mandatory field flag (Y/N)

showFilter
boolean

Show field in filter flag (Y/N)

isSearchable
boolean

Field participation in search flag (Y/N)

editFormLabel
lang_map

Labels in the edit form by languages

helpMessage
lang_map

Help text by languages

settings
object

Additional field settings. The set of keys depends on the field type (detailed description)

enum
uf_enum_element[]

List of value options for the enumeration field type.

To apply changes to enum, field.userTypeId must be set to enumeration

userTypeId
string

Field type.

Used when updating enum, in this case, set it to enumeration

Parameter settings

Each field type has its own set of keys in settings.

Name
type

Description

DEFAULT_VALUE
string

Default value

ROWS
integer

Number of rows in the input field, must be greater than 0

SIZE
integer

Width of the input field

REGEXP
string

Regular expression for validation

MIN_LENGTH
integer

Minimum string length

MAX_LENGTH
integer

Maximum string length

Name
type

Description

DEFAULT_VALUE
integer

Default value

SIZE
integer

Width of the input field

MIN_VALUE
integer

Minimum value

MAX_VALUE
integer

Maximum value

Name
type

Description

DEFAULT_VALUE
double

Default value

PRECISION
integer

Number precision, must be greater than or equal to 0

SIZE
integer

Width of the input field

MIN_VALUE
double

Minimum value

MAX_VALUE
double

Maximum value

Name
type

Description

DEFAULT_VALUE
integer

Default value, where 1 = yes and 0 = no

DISPLAY
string

Appearance, possible values: CHECKBOX, RADIO, DROPDOWN

LABEL
string

Label for the Yes value

LABEL_CHECKBOX
string

Label for CHECKBOX mode

Name
type

Description

DEFAULT_VALUE
object

Default value in the format {VALUE, TYPE}, where TYPE: NONE, NOW, FIXED

USE_SECOND
boolean

Use seconds in the datetime field

USE_TIMEZONE
boolean

Use timezone in the datetime field

Name
type

Description

DEFAULT_VALUE
string

Default value in the format {VALUE}|{CURRENCY}

Name
type

Description

POPUP
boolean

Open link in a new window

SIZE
integer

Width of the input field

MIN_LENGTH
integer

Minimum length of the value

MAX_LENGTH
integer

Maximum length of the value

DEFAULT_VALUE
string

Default value

ROWS
integer

Number of rows in the input field

Name
type

Description

SHOW_MAP
boolean

Show map for the address

Name
type

Description

SIZE
integer

Width of the input field

LIST_WIDTH
integer

Width of the preview in the list

LIST_HEIGHT
integer

Height of the preview in the list

MAX_SHOW_SIZE
integer

Maximum file size for display

MAX_ALLOWED_SIZE
integer

Maximum allowed file size

EXTENSIONS
string[]

List of allowed extensions

TARGET_BLANK
boolean

Open file in a new tab

Name
type

Description

DISPLAY
string

Appearance, possible values: LIST, UI, CHECKBOX, DIALOG

LIST_HEIGHT
integer

Height of the list, must be greater than 0

CAPTION_NO_VALUE
string

Label for empty value

SHOW_NO_VALUE
boolean

Show empty value

Name
type

Description

DISPLAY
string

Appearance, possible values: DIALOG, UI, LIST, CHECKBOX

LIST_HEIGHT
integer

Height of the list, must be greater than 0

IBLOCK_ID
integer

Identifier of the information block

DEFAULT_VALUE
string

Default value

ACTIVE_FILTER
boolean

Use only active elements

Name
type

Description

ENTITY_TYPE
string

Identifier of the CRM reference type. Possible values can be obtained using the method crm.status.entity.types

Name
type

Description

LEAD
boolean

Enable binding to leads

CONTACT
boolean

Enable binding to contacts

COMPANY
boolean

Enable binding to companies

DEAL
boolean

Enable binding to deals

QUOTE
boolean

Enable binding to estimates

ORDER
boolean

Enable binding to orders

SMART_INVOICE
boolean

Enable binding to invoices

DYNAMIC_*
boolean

Enable binding to SPA with a specific typeId

Separate settings in settings for the employee type are not used.

Settings are defined by the user-defined field type handler.

Type uf_enum_element

Name
type

Description

id
integer

Identifier of the existing option. Used for updating or deleting

value
string

Value of the option

def
boolean

Default value flag (Y/N)

sort
integer

Sort index

xmlId
string

External identifier of the option

del
boolean

Flag for deleting the existing option (Y/N)

Some field parameters cannot be changed after creation. If they are passed in field, the change will not be applied.

Code Examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"moduleId":"crm","id":7095,"field":{"mandatory":"Y","editFormLabel":{"en":"List of characteristics (updated)"}}}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/userfieldconfig.update
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"moduleId":"crm","id":7095,"field":{"mandatory":"Y","editFormLabel":{"en":"List of characteristics (updated)"}},"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/userfieldconfig.update
        
// This snippet is an ES module: top-level await requires type="module" or a bundler.
        // $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
        import { Text } from '@bitrix24/b24jssdk'
        import type { B24Frame } from '@bitrix24/b24jssdk'
        
        declare const $b24: B24Frame
        
        // Shape of the payload returned in result (match the "response handling" section of the page)
        type UserfieldconfigUpdateResult = {
          field: {
            id: string
            entityId: string
            fieldName: string
            userTypeId: string
            xmlId: string | null
            sort: string
            multiple: string
            mandatory: string
            showFilter: string
            showInList: string
            editInList: string
            isSearchable: string
            settings: Record<string, unknown>
            languageId: Record<string, string>
            editFormLabel: Record<string, string | null>
            listColumnLabel: Record<string, string | null>
            listFilterLabel: Record<string, string | null>
            errorMessage: Record<string, string | null>
            helpMessage: Record<string, string | null>
            enum?: Array<{
              id: string
              userFieldId: string
              value: string
              def: string
              sort: string
              xmlId: string
            }>
          }
        }
        
        try {
          const response = await $b24.actions.v2.call.make<UserfieldconfigUpdateResult>({
            method: 'userfieldconfig.update',
            params: {
              moduleId: 'crm',
              id: 7095,
              field: {
                mandatory: 'Y',
                editFormLabel: {
                  en: 'List of characteristics (updated)',
                },
              },
            },
            requestId: Text.getUuidRfc4122()
          })
        
          // The payload is available only on a successful response
          if (!response.isSuccess) {
            console.error(response.getErrorMessages().join('; '))
          } else {
            const result = response.getData()!.result
            console.info('Updated field:', result.field.id, result.field.fieldName, result.field.mandatory)
          }
        } catch (error) {
          // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
          console.error(error)
        }
        
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
        <script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
        <script>
          async function updateUserfieldconfig() {
            try {
              // Initialize the SDK inside a Bitrix24 frame
              const $b24 = await B24Js.initializeB24Frame()
        
              const response = await $b24.actions.v2.call.make({
                method: 'userfieldconfig.update',
                params: {
                  moduleId: 'crm',
                  id: 7095,
                  field: {
                    mandatory: 'Y',
                    editFormLabel: {
                      en: 'List of characteristics (updated)',
                    },
                  },
                },
                requestId: B24Js.Text.getUuidRfc4122()
              })
        
              // The payload is available only on a successful response
              if (!response.isSuccess) {
                console.error(response.getErrorMessages().join('; '))
                return
              }
        
              const result = response.getData().result
              console.info('Updated field:', result.field.id, result.field.fieldName, result.field.mandatory)
            } catch (error) {
              // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
              console.error(error)
            }
          }
        
          document.addEventListener('DOMContentLoaded', updateUserfieldconfig)
        </script>
        
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
        
        try:
            bitrix_response = client.userfieldconfig.update(
                module_id="crm",
                bitrix_id=7095,
                field={
                    "mandatory": "Y",
                    "editFormLabel": {
                        "ru": "List of characteristics (updated)",
                        "en": "List of characteristics (updated)",
                    },
                },
            ).response
            result = bitrix_response.result
            print(result)
        except BitrixAPIError as error:
            print(
                "Bitrix API error",
                f"error: {error.error}",
                f"error_description: {error.error_description}",
                sep="\n",
            )
        except BitrixSDKException as error:
            print(f"Bitrix SDK error: {error.message}")
        except Exception as error:
            print(f"Unexpected error: {error}")
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'userfieldconfig.update',
                    [
                        'moduleId' => 'crm',
                        'id' => 7095,
                        'field' => [
                            'mandatory' => 'Y',
                            'editFormLabel' => [
                                'en' => 'List of characteristics (updated)',
                            ],
                        ],
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Result: ' . print_r($result, true);
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'userfieldconfig.update',
            {
                moduleId: 'crm',
                id: 7095,
                field: {
                    mandatory: 'Y',
                    editFormLabel: {
                        en: 'List of characteristics (updated)',
                    },
                },
            },
            (result) => {
                result.error()
                    ? console.error(result.error())
                    : console.info(result.data())
                ;
            },
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'userfieldconfig.update',
            [
                'moduleId' => 'crm',
                'id' => 7095,
                'field' => [
                    'mandatory' => 'Y',
                    'editFormLabel' => [
                        'en' => 'List of characteristics (updated)',
                    ],
                ],
            ]
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        
// client and ctx are already created — see the Go SDK section
        res, err := client.Core().Call(ctx, "userfieldconfig.update", b24.Params{
        	"moduleId": "crm",
        	"id":       7095,
        	"field": b24.Params{
        		"mandatory": "Y",
        		"editFormLabel": b24.Params{
        			"en": "List of characteristics (updated)",
        		},
        	},
        })
        if err != nil {
        	return fmt.Errorf("userfieldconfig.update: %w", err)
        }
        
        // The method wraps the response in an object with the "field" key.
        raw, ok := b24.Unwrap(res.Result, "field")
        if !ok {
        	return fmt.Errorf("no field key in the response")
        }
        
        var item struct {
        	ID         b24.ID `json:"id"`
        	EntityID   string `json:"entityId"`
        	FieldName  string `json:"fieldName"`
        	UserTypeID string `json:"userTypeId"`
        	Sort       string `json:"sort"`
        	Multiple   string `json:"multiple"`
        }
        if err := json.Unmarshal(raw, &item); err != nil {
        	return fmt.Errorf("parse response: %w", err)
        }
        fmt.Println(item.ID, item.EntityID)
        

Response Handling

HTTP Status: 200

{
            "result": {
                "field": {
                    "id": "7095",
                    "entityId": "CRM_7",
                    "fieldName": "UF_CRM_7_NEW_REST_LIST_2026",
                    "userTypeId": "enumeration",
                    "xmlId": null,
                    "sort": "100",
                    "multiple": "Y",
                    "mandatory": "Y",
                    "showFilter": "N",
                    "showInList": "Y",
                    "editInList": "Y",
                    "isSearchable": "N",
                    "settings": {
                        "DISPLAY": "LIST",
                        "LIST_HEIGHT": 1,
                        "CAPTION_NO_VALUE": "",
                        "SHOW_NO_VALUE": "Y"
                    },
                    "languageId": {
                        "en": "en"
                    },
                    "editFormLabel": {
                        "en": "List of characteristics (updated)"
                    },
                    "listColumnLabel": {
                        "en": null
                    },
                    "listFilterLabel": {
                        "en": null
                    },
                    "errorMessage": {
                        "en": null
                    },
                    "helpMessage": {
                        "en": null
                    },
                    "enum": [
                        {
                            "id": "3671",
                            "userFieldId": "7095",
                            "value": "Characteristic 1",
                            "def": "N",
                            "sort": "100",
                            "xmlId": "38a8c98a5de02f8ccdca2244e5065ecd"
                        },
                        {
                            "id": "3673",
                            "userFieldId": "7095",
                            "value": "Characteristic 2",
                            "def": "Y",
                            "sort": "200",
                            "xmlId": "9520e17b39f3525b820b809914b52207"
                        }
                    ]
                }
            },
            "time": {
                "start": 1774356026,
                "finish": 1774356026.949068,
                "duration": 0.9490680694580078,
                "processing": 0,
                "date_start": "2026-03-24T15:40:26+01:00",
                "date_finish": "2026-03-24T15:40:26+01:00",
                "operating_reset_at": 1774356626,
                "operating": 0
            }
        }
        

Returned Data

Name
type

Description

result
object

Root element of the response (detailed description)

time
time

Information about the request execution time

Object result

Name
type

Description

field
object

Settings of the updated user field (detailed description)

Object field

Name
type

Description

id
integer

Identifier of the field settings

entityId
string

Identifier of the object

fieldName
string

Field code

userTypeId
string

Identifier of the field type

xmlId
string

External identifier of the field

sort
integer

Sort index

multiple
boolean

Multiple value flag (Y/N)

mandatory
boolean

Mandatory field flag (Y/N)

showFilter
boolean

Show field in filter flag

showInList
boolean

Show field in list flag

editInList
boolean

Edit in list flag

isSearchable
boolean

Participation in search flag

settings
object

Additional field settings. See Parameter settings.

The set of keys depends on userTypeId

languageId
object

Languages for which field labels are set

editFormLabel
lang_map

Labels in the edit form

listColumnLabel
lang_map

Column labels in the list

listFilterLabel
lang_map

Filter labels

errorMessage
lang_map

Error message text

helpMessage
lang_map

Help text for the field

enum
object[]

Value options.

This field is returned only for userTypeId = enumeration

Error Handling

HTTP Status: 400

{
            "error": "",
            "error_description": "You cannot change the settings of the user field"
        }
        

Name
type

Description

error
string

String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only error_description shows the reason

error_description
string

Error message for the developer. Do not show it to the end user without processing

Possible Error Codes

Code

Description

Value

Empty value

You cannot change the settings of the user field

Insufficient permissions to modify the field. This same error is returned if the field with the provided id has already been deleted or is unavailable in the context of moduleId

Empty value

The current method required more scopes. (crm)

The application does not have the required scope for the module from moduleId

Empty value

No settings for UserFieldAccess

Access to user fields is not configured for the provided moduleId

Empty value

Error while attempting to change user field settings

General error in changing the field

Statuses and System Error Codes

HTTP Status: 4xx, 5xx

The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.

Status

Code
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

429

OPERATION_TIME_LIMIT
Method is blocked due to operation time limit

The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit

401

NO_AUTH_FOUND
Wrong authorization data

The request contains no authorization data: neither an access token nor a webhook code was passed

401

INVALID_REQUEST
Https required

Methods are called over the HTTPS protocol only

401

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support

401

ACCESS_DENIED
REST is available only on commercial plans

REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — REST is available only by subscription

401

INVALID_CREDENTIALS
Invalid request credentials

No active webhook with the specified user identifier and secret code was found

404

ERROR_METHOD_NOT_FOUND
Method not found!

No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope

401

insufficient_scope
The request requires higher privileges than provided by the webhook token

The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with provided by the access token

401

expired_token
The access token provided has expired

The access token has expired

401

user_access_error
The user does not have access to the application

The application is installed, but the Bitrix24 administrator has granted access to it only to specific users

403

PORTAL_DELETED
Portal was deleted

The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site

Continue Learning