For AI agents: markdown of this page — /docs-content-en/entities/requisite-presets/preset-fields/update.md documentation index — /llms.txt

Update a preset field

PATCH /v1/requisite-presets/:presetId/fields/:id

Updates the field's system name, title, sort order or short-list flag on a preset field row. Send only the fields you want to change.

Parameters

Parameter Type Required Description
ParameterpresetId (path) Typenumber Requiredyes DescriptionRequisite preset ID
Parameterid (path) Typenumber Requiredyes DescriptionPreset field row ID (from GET /v1/requisite-presets/:presetId/fields — the id field)

Request fields (body)

Field Type Required Description
FieldfieldName Typestring Requiredno DescriptionNew system field name from the fields available to add. If omitted, the current name is retained when the row is read successfully. Validation details are described below
FieldfieldTitle Typestring Requiredno DescriptionField title in the Bitrix24 interface
FieldinShortList Typeboolean Requiredno DescriptionWhether to show the field in the short list. Accepts true/false
Fieldsort Typenumber Requiredno DescriptionSort order of the field within the preset

Examples

curl — personal key

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/requisite-presets/1/fields/1" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fieldTitle": "Company tax ID",
    "inShortList": false,
    "sort": 100
  }'

curl — OAuth application

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/requisite-presets/1/fields/1" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sort": 100
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets/1/fields/1', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    fieldTitle: 'Company tax ID',
    inShortList: false,
    sort: 100,
  }),
})

const { success, data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets/1/fields/1', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    sort: 100,
  }),
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionOperation result
Fielddata.id Typenumber DescriptionID of the updated preset field row
Fielddata.updated Typeboolean DescriptionAlways true on successful update

Response example

JSON
{
  "success": true,
  "data": {
    "id": 1,
    "updated": true
  }
}

Error response example

404 — field row not found:

JSON
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Preset field 99999 not found in preset 1"
  }
}

Errors

HTTP Code Description
HTTP404 CodeNOT_FOUND DescriptionNo field row with this id found in the given preset
HTTP400 CodeINVALID_FIELD_NAME DescriptionThe current row was read successfully, and the fieldName sent differs from its name ignoring case and is absent from the recognised list of the fields available to add. The update was not performed
HTTP400 CodeINVALID_FIELD_NAME DescriptionfieldName was not sent as a string (a number, array, object, null). Message: Field name must be a string, got <type>.
HTTP400 CodeINVALID_PRESET_ID DescriptionpresetId is not a positive integer
HTTP400 CodeINVALID_FIELD_ID Descriptionid is not a positive integer
HTTP403 CodeSCOPE_DENIED DescriptionAPI key lacks the crm scope. Message: This endpoint requires 'crm' scope
HTTP401 CodeTOKEN_MISSING DescriptionAPI key has no configured tokens

Full list of common API errors — Errors.

Known specifics

A fieldName change is checked before writing when validation data is available. If the current row is read successfully and the new name differs from the stored name ignoring case, it is checked against a recognised list of fields available to add. A name absent from that list returns 400 INVALID_FIELD_NAME. None of the requested changes are written. If reading the row or list fails, or the list shape is not recognised, validation is skipped and the request is forwarded to Bitrix24.

The name uses Bitrix24's spelling when that spelling is available. A name matching the current name uses the stored spelling. A validated rename uses the spelling from the available list. If validation is skipped, the request's spelling is forwarded.

A successful preliminary read with no row returns 404 NOT_FOUND before writing. If the preliminary read fails, the update continues and the Bitrix24 call determines the response.

Re-read the list before updating. A field row id is positional and may change after the preset composition changes. Take the current id from a fresh field list, finding the row by fieldName — otherwise the update may hit a different field.

See also