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 title, sort position, or short-list flag of a preset field row. Pass only the fields you want to change.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
presetId (path) |
number | yes | Requisite preset ID |
id (path) |
number | yes | Preset field row ID (from GET /v1/requisite-presets/:presetId/fields — the id field) |
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
fieldTitle |
string | no | Field title in the Bitrix24 interface |
inShortList |
boolean | no | Whether to show the field in the short list. Accepts true/false |
sort |
number | no | Sort order of the field within the preset |
Examples
curl — personal key
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 app
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
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 app
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 |
|---|---|---|
success |
boolean | Always true on success |
data |
object | Operation result |
data.id |
number | ID of the updated preset field row |
data.updated |
boolean | Always true on successful update |
Response example
{
"success": true,
"data": {
"id": 1,
"updated": true
}
}
Error response example
404 — field row not found:
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Preset field 99999 not found in preset 1"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 404 | NOT_FOUND |
No field row with this id found in the given preset |
| 400 | INVALID_FIELD_NAME |
The fieldName sent differs from the row's name and is not among the fields available to add. The update was not performed |
| 400 | INVALID_FIELD_NAME |
fieldName was not sent as a string (a number, array, object, null). Message: Field name must be a string, got <type>. |
| 400 | INVALID_PRESET_ID |
presetId is not a positive integer |
| 400 | INVALID_FIELD_ID |
id is not a positive integer |
| 403 | SCOPE_DENIED |
API key lacks the crm scope. Message: This endpoint requires 'crm' scope |
| 401 | TOKEN_MISSING |
API key has no configured tokens |
Full list of common API errors — Errors.
Known specifics
A fieldName change is checked before the write. When the fieldName in the body differs from the name the row already carries, the name is checked against the fields available to add; a name outside that list returns 400 INVALID_FIELD_NAME and no field of the row changes — including sort and fieldTitle if they arrived in the same request. The Bitrix24 update method does not validate the name itself, so without this check a name with no field behind it settled into the preset. A name another row of the same preset already holds is absent from the available list and is rejected too. It is still safer not to rename a row but to delete it and add a new one with the desired fieldName.
The name's letter case is normalised to what Bitrix24 returned. You may send fieldName in any case: when it matches the current name, the stored spelling is written back; on a rename, the spelling the available list carried is used. Your own spelling never reaches the preset.
A request carrying fieldName for a row that does not exist answers 404 before the write. It used to go to Bitrix24 and return its answer.
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.