[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcrm-required-fields\u002Fset":3,"docs-tabs-entities\u002Fcrm-required-fields\u002Fset":6},{"content":4,"lastmod":5},"## Set a CRM field requirement\n\n`PUT \u002Fv1\u002Fdeals\u002Ffields\u002Frequired`\n\nSet whether a CRM field is required for everyone who edits or saves records in the Bitrix24 account.\n\n> **Rolling out with `crm 26.2000.0`.** Availability depends on the Bitrix24 account. A disabled feature or missing portal method returns `422 METHOD_NOT_YET_AVAILABLE` with `error.release`. The release line alone does not guarantee that the method is enabled.\n\nScope `crm`. READWRITE is required.\n\n## Parameters\n\nResource variants:\n\n`PUT \u002Fv1\u002Fdeals\u002Ffields\u002Frequired`\n\n`PUT \u002Fv1\u002Fleads\u002Ffields\u002Frequired`\n\n`PUT \u002Fv1\u002Fcontacts\u002Ffields\u002Frequired`\n\n`PUT \u002Fv1\u002Fcompanies\u002Ffields\u002Frequired`\n\n`PUT \u002Fv1\u002Fquotes\u002Ffields\u002Frequired`\n\n`PUT \u002Fv1\u002Finvoices\u002Ffields\u002Frequired`\n\n`PUT \u002Fv1\u002Fitems\u002F:entityTypeId\u002Ffields\u002Frequired`\n\nSmart process `entityTypeId` is a safe integer of at least 128, from [smart processes](\u002Fdocs\u002Fentities\u002Fsmart-processes\u002Flist). Use the built-in resource names for other types.\n\n## Request body\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `fieldId` | string | yes | Native non-empty CRM field identifier, for example `comments` or `opportunity`. See the naming rules below. |\n| `categoryId` | integer | yes, except leads and quotes | Non-negative funnel ID from [deal categories](\u002Fdocs\u002Fentities\u002Fdeal-categories\u002Flist) or [categories](\u002Fdocs\u002Fentities\u002Fcategories\u002Flist). Bitrix24 checks whether it applies. |\n| `requiredStageIds` | string[] | no | Omit for the entire funnel or global requirement. A non-empty list selects [stages](\u002Fdocs\u002Fentities\u002Fstatuses\u002Flist). `[]` clears the setting. |\n\nUse only a flat JSON body, without a `fields` wrapper or query parameters.\n\nLeads and quotes do not accept `categoryId`. Other types require it. `0` selects the default category for deals, contacts and companies. Invoices and smart processes need an existing positive category ID. These rules are checked by Bitrix24.\n\nStandard field identifiers use native CRM names. The amount field is `opportunity`, although the V1 entity API calls it `amount`. V1 aliases are not converted.\n\nFor a custom field, use the original `UF_*` value from `fieldName` in [CRM user fields](\u002Fdocs\u002Fuserfields\u002Fcrm) or [smart process user fields](\u002Fdocs\u002Fuserfields\u002Fsmart-processes). Smart invoices use `\u002Fv1\u002Fuserfields\u002Finvoices`. Do not use the `ufCrm...` alias from the entity dictionary. Field identifiers are not converted.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PUT \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdeals\u002Ffields\u002Frequired\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"fieldId\": \"comments\", \"categoryId\": 0}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PUT \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdeals\u002Ffields\u002Frequired\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"fieldId\": \"comments\", \"categoryId\": 0}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdeals\u002Ffields\u002Frequired', {\n  \"method\": \"PUT\",\n  \"headers\": {\n    \"X-Api-Key\": \"YOUR_API_KEY\",\n    \"Content-Type\": \"application\u002Fjson\"\n  },\n  \"body\": \"{\\\"fieldId\\\": \\\"comments\\\", \\\"categoryId\\\": 0}\"\n})\nconst result = await response.json()\nconsole.log(result)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdeals\u002Ffields\u002Frequired', {\n  \"method\": \"PUT\",\n  \"headers\": {\n    \"X-Api-Key\": \"YOUR_APP_KEY\",\n    \"Authorization\": \"Bearer USER_SESSION_TOKEN\",\n    \"Content-Type\": \"application\u002Fjson\"\n  },\n  \"body\": \"{\\\"fieldId\\\": \\\"comments\\\", \\\"categoryId\\\": 0}\"\n})\nconst result = await response.json()\nconsole.log(result)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|---|---|---|\n| `success` | boolean | `true` |\n| `data.fieldId` | string | Field identifier. |\n| `data.categoryId` | integer or null | Funnel context, or null for a global setting. |\n| `data.mode` | string | `none` — no setting; `all` — required throughout; `stages` — required at selected stages. |\n| `data.requiredStageIds` | string[] | Required stages. |\n| `data.globallyRequired` | boolean | Field is globally required by the platform. |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"fieldId\": \"comments\",\n    \"categoryId\": 0,\n    \"mode\": \"all\",\n    \"requiredStageIds\": [],\n    \"globallyRequired\": false\n  }\n}\n```\n\n## Error response example\n\n400 — missing field identifier:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"fieldId must be a non-empty string\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | Malformed parameters or body. |\n| 400 | `INVALID_FIELDS` | Unknown body field. |\n| 400 | `UNKNOWN_FILTER_FIELD` | Unknown or misplaced query parameter. |\n| 400 | `INVALID_ENTITY_TYPE` | Invalid smart process type. |\n| 401 | `TOKEN_MISSING` | Missing portal credentials. |\n| 403 | `SCOPE_DENIED` | Missing crm scope. |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | Write through a read-only key. |\n| 404 | Native Bitrix24 code | Field or context not found. |\n| 409 | Native Bitrix24 code | Configuration conflict. |\n| 422 | `METHOD_NOT_YET_AVAILABLE` | Feature is off or the method is unavailable. error.release identifies the release line. |\n| 502 | `BITRIX_UNAVAILABLE` | Malformed upstream response. |\n\n[Common errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nClearing a setting does not override a system field that Bitrix24 makes globally required. Unknown fields and invalid stage or funnel combinations are rejected by Bitrix24 with its original code and message.\n\n## See also\n\n- [Required CRM fields](\u002Fdocs\u002Fentities\u002Fcrm-required-fields)\n","2026-11-06",{},1794739358444]