[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-openlines\u002Fconfig\u002Fupdate":3,"docs-tabs-openlines\u002Fconfig\u002Fupdate":6},{"content":4,"lastmod":5},"\n## Update Open Channel configuration\n\n`PATCH \u002Fv1\u002Fopenline-configs\u002F:id`\n\nUpdates fields of an existing Open Channel configuration. Pass only the fields you change — the rest are left untouched. Full field list — [Configuration fields](\u002Fdocs\u002Fopenlines\u002Fconfig\u002Ffields).\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Numeric configuration identifier |\n\n## Request fields (body)\n\nThe request body must not be empty — at least one field is required. Pass only the fields you want to change.\n\n**Field names.** Pass every field in camelCase (`name`, `active`, `queueType`, `queueTime`, `workTimeFrom`, etc.) — the canonical case. UPPER_SNAKE_CASE names are also accepted for backward compatibility.\n\n**Boolean fields** (`active`, …) accept `true` \u002F `false` — the value is coerced to `\"Y\"`\u002F`\"N\"` automatically. For example, `{ \"active\": false }` (or `{ \"ACTIVE\": false }`) turns the channel off.\n\n| Field | Type | Description |\n|------|-----|---------|\n| `name` | string | Open Channel name |\n| `active` | boolean | Whether the channel is active (`true` \u002F `false`) |\n| `crmCreate` | string | Type of CRM record created on first contact. Allowed values: `none`, `lead`, `deal` |\n| `queueTime` | number | Operator response wait time (seconds) |\n| `noAnswerTime` | number | Time until the \"No answer\" rule triggers (seconds) |\n| `welcomeMessageText` | string | Welcome message text |\n| `workTimeFrom` | string | Start of working hours, for example `\"9\"` or `\"9.30\"` |\n| `workTimeTo` | string | End of working hours, for example `\"18\"` or `\"17.30\"` |\n| `workTimeTimezone` | string | Working-hours time zone |\n\nFull list of available fields — [Configuration fields](\u002Fdocs\u002Fopenlines\u002Fconfig\u002Ffields).\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fopenline-configs\u002F29\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"queueTime\": 120,\n    \"welcomeMessageText\": \"Hello! How can we help?\"\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fopenline-configs\u002F29\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"queueTime\": 120,\n    \"welcomeMessageText\": \"Hello! How can we help?\"\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fopenline-configs\u002F29', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    queueTime: 120,\n    welcomeMessageText: 'Hello! How can we help?',\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fopenline-configs\u002F29', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    queueTime: 120,\n    welcomeMessageText: 'Hello! How can we help?',\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | object | Operation result |\n| `data.id` | number | Identifier of the updated configuration |\n| `data.updated` | boolean | `true` — the update was applied |\n| `meta.warnings` | string[] | Optional. Present when some passed fields are unrecognised — lists the keys Bitrix24 ignored |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 29,\n    \"updated\": true\n  }\n}\n```\n\n## Error response example\n\n404 — configuration not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"openlineConfig 99999 not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_ID` | The `id` parameter is not a positive integer |\n| 400 | `VALIDATION_ERROR` | The request body is empty — at least one field must be passed |\n| 400 | `VALIDATION_ERROR` | The body has no recognised field (all keys are unknown) — the message lists the unrecognised fields |\n| 400 | `VALIDATION_ERROR` | The `crmCreate` value is not `none`, `lead`, or `deal` |\n| 400 | `READONLY_FIELD` | A read-only field (`id`, `queue`, `dateCreate`, and others) was passed in the body |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 403 | `SCOPE_DENIED` | The API key lacks the `imopenlines` scope |\n| 404 | `ENTITY_NOT_FOUND` | A configuration with the given `id` does not exist |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nThe response contains only `id` and `data.updated: true` — there are no configuration fields in the response. To get the current values of all fields after the update, call `GET \u002Fv1\u002Fopenline-configs\u002F:id`.\n\n**Request body validation.** Unknown keys in the request body are not saved. Vibecode checks the body against the full field schema ([Configuration fields](\u002Fdocs\u002Fopenlines\u002Fconfig\u002Ffields)) and reacts as follows:\n\n- no field is recognised — the request is rejected with `400 VALIDATION_ERROR` before the Bitrix24 call, and the message lists the unrecognised fields.\n- at least one field is recognised but some keys are unknown — the update is applied, and the response carries `meta.warnings` with the list of ignored keys.\n- `crmCreate` has a value other than `none`, `lead`, or `deal` — the whole body is rejected with `400 VALIDATION_ERROR` before Bitrix24 is called, and no submitted change is applied.\n- a read-only field (`id`, `queue`, `dateCreate`, and others) is passed in the body — the request is rejected with `400 READONLY_FIELD`.\n\n## See also\n\n- [Get configuration](\u002Fdocs\u002Fopenlines\u002Fconfig\u002Fget)\n- [Configuration fields](\u002Fdocs\u002Fopenlines\u002Fconfig\u002Ffields)\n- [List configurations](\u002Fdocs\u002Fopenlines\u002Fconfig\u002Flist)\n- [Batch](\u002Fdocs\u002Fbatch)\n","2026-09-23",{},1794739594954]