[{"data":1,"prerenderedAt":12},["ShallowReactive",2],{"docs-entities\u002Fcrm-forms\u002Fpublishing":3,"docs-tabs-entities\u002Fcrm-forms\u002Fpublishing":6},{"content":4,"lastmod":5},"# Publishing and results\n\nGet the code that embeds a form on a website, configure click-triggered and automatic display, find out which website widgets and Open Channels the form is linked to, and submit visitor data to the form.\n\nBitrix24 API: `crm.form.embedding.*`, `crm.form.sitebutton.list`, `crm.form.openline.list`, `crm.webform.result.add`\nScope: `crm`\n\nVisitor data submission uses REST v2. Embedding and association lists use REST v3.\n\n## Operations\n\n- [Embedding code](.\u002Fembedding.md) — `GET \u002Fv1\u002Fcrm-forms\u002F:id\u002Fembedding`\n- [Embedding settings](.\u002Fembedding-update.md) — `PATCH \u002Fv1\u002Fcrm-forms\u002F:id\u002Fembedding`\n- [Website widgets](.\u002Fsite-buttons.md) — `GET \u002Fv1\u002Fcrm-forms\u002F:id\u002Fsite-buttons`\n- [Get Open Channels for a form](.\u002Fopenlines.md) — `GET \u002Fv1\u002Fcrm-forms\u002F:id\u002Fopenlines`\n- [Submit visitor data](.\u002Fresults.md) — `POST \u002Fv1\u002Fcrm-forms\u002F:id\u002Fresults`\n\n## Typical scenario\n\n1. Activate the form in [form management](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fmanagement).\n2. Get all embedding settings, or choose `inline`, `click`, `auto` or `link`. The link variant returns `url`. If resources are not ready, expect `resourcesReady: false` and any `code: null` supplied by Bitrix24; do not treat the response as an error. Use `updatedTime` from GET when changing embedding settings. If the write returns a read warning, GET the form and embedding before the next change, without repeating the write.\n3. Submit visitor values from your own interface through `POST \u002Fv1\u002Fcrm-forms\u002F:id\u002Fresults`, or send the form to a customer in an [Open Channel](\u002Fdocs\u002Fopenlines\u002Fsend-form).\n\n## See also\n\n- [Form management](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fmanagement)\n- [Builder dictionaries](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fbuilder)\n- [CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms)\n","2026-11-06",{"embedding.md":7,"embedding-update.md":8,"site-buttons.md":9,"openlines.md":10,"results.md":11},"## Get form embedding codes\n\n`GET \u002Fv1\u002Fcrm-forms\u002F:id\u002Fembedding`\n\nGet the form embed code or a public link to place on a website. Query parameters change the requested variant without saving settings.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `id` (path) | number | yes | Positive form ID from [List forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n| `variant` (query) | string | no | `inline`, `click`, `auto`, `link`. Omit to get all embedding settings |\n| `buttonText` (query) | string | no | Button caption override, validated by Bitrix24 |\n| `buttonType` (query) | string | no | Button type override, such as `button` or `link`. Bitrix24 validates the value |\n| `delay` (query) | integer | no | Delay override in seconds. Bitrix24 validates the value and its combination with `variant` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F59\u002Fembedding?variant=link\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F59\u002Fembedding?variant=link\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F59\u002Fembedding?variant=link', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\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\u002Fcrm-forms\u002F59\u002Fembedding?variant=link', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|---|---|---|\n| `success` | boolean | `true` on success |\n| `data` | object | Embedding object as returned by Bitrix24. Without `variant`, includes available variants and settings. With `variant=link`, contains `{variant, url}` |\n| `data.formActive` | boolean | Whether the form is active |\n| `data.resourcesReady` | boolean | Whether form resources are ready |\n| `data.publicUrl` | string | Public form URL, including its public signature |\n| `data.inline` | object | Form embedded in the page |\n| `data.click` | object | Form opened on click |\n| `data.auto` | object | Form opened after a delay |\n| `data.\u003Cvariant>.code` | string \u002F null | HTML embed code, or `null` when resources are not ready |\n| `data.\u003Cvariant>.previewUrl` | string | Preview URL when supplied. Missing fields and `null` values are preserved |\n| `data.\u003Cvariant>.settings` | object \u002F null | Current settings. See [Update embedding settings](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fembedding-update). Values are passed through, including `null` |\n| `data.\u003Cvariant>.options` | object \u002F null | Allowed setting values returned by Bitrix24, including `null` |\n| `data.\u003Cvariant>.options.type` | string[] | `popup`, `panel` |\n| `data.\u003Cvariant>.options.position` | string[] | `left`, `center`, `right` |\n| `data.\u003Cvariant>.options.vertical` | string[] | `bottom`, `top` |\n| `data.click.options.button.font` | string[] | `modern`, `classic`, `elegant` |\n| `data.click.options.button.align` | string[] | `inline`, `left`, `center`, `right` |\n| `data.auto.options.delay` | number[] | `3`, `5`, `7`, `10`, `15`, `20`, `25`, `30`, `40`, `60`, `120` |\n| `data.variant` | string | Selected variant, only when `variant` is set |\n| `data.code` | string \u002F null | Embed code for the selected HTML variant, including `null` when supplied |\n| `data.url` | string | Public URL when `variant=link` |\n| `meta.redacted` | string[] | Paths with connection credentials replaced. Such a response is not a complete configuration for saving back |\n\n## Response example\n\nResponse for `variant=link`. The public domain and signature are placeholders.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"variant\": \"link\",\n    \"url\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fcrm_form_tz6sk\u002F?telemetry_sign=DUMMY_PUBLIC_SIGNATURE\"\n  }\n}\n```\n\n## Error response example\n\n400 — the form ID is not a positive integer:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"id must be a positive safe integer\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | Invalid form ID or request structure |\n| 400 | `INVALID_PARAMS` | Unknown query parameter or invalid request structure |\n| 400 | `INVALID_PARAMS` | Bitrix24 rejected a parameter or parameter combination. The original code is in `error.b24Code`, with field diagnostics in `error.validation` when supplied |\n| 409 | `CRM_FORM_REST_NOT_ENABLED` | CRM form REST methods are disabled on the Bitrix24 account. The original code for the missing method is in `error.b24Code` |\n| 403 | `BITRIX_INSUFFICIENT_SCOPE` | The Bitrix24 token lacks the required scope. The original code is in `error.b24Code` |\n| 404 | `ENTITY_NOT_FOUND` | Form not found |\n| 403 | `SCOPE_DENIED` | API key lacks the `crm` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | The user lacks access permissions |\n| 401 | `TOKEN_MISSING` | API key has no configured credentials |\n| 502 | `BITRIX_UNAVAILABLE` | Invalid embedding response |\n\nErrors from Bitrix24 include the original `error.b24Code` and field diagnostics in `error.validation`, when supplied. For common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nWhen resources are not ready, the response remains successful with `resourcesReady: false` and any `code: null` supplied by Bitrix24. Missing fields are not filled in. Public signatures are preserved. Only credentials used for the current connection are replaced, with paths listed in `meta.redacted`.\n\n## See also\n\n- [Update form embedding settings](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fembedding-update)\n- [List forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist)\n","## Update form embedding settings\n\n`PATCH \u002Fv1\u002Fcrm-forms\u002F:id\u002Fembedding`\n\nUpdate the settings for showing a form on a website on click and after a delay. Omitted settings remain unchanged.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `id` (path) | number | yes | Positive form ID from [List forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n\n## Request fields (body)\n\nExample settings: `click.settings.button.text`, `auto.settings.delay`.\n\nGet `updatedTime` from [Get form](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fget) before the request. Replace `YOUR_UPDATED_TIME` in the examples with that value. Send settings flat at the root of the body, as in the examples, or use `{updatedTime, fields: {click: {...}, auto: {...}}}`. `fields` must be an object when used as a wrapper. Do not mix wrapped settings with settings at the root.\n\nThe table gives examples of settings, not an exhaustive list. Bitrix24 validates property paths, values and whether `null` can clear a setting. Read current options from [Get form embedding codes](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fembedding).\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `updatedTime` | string | yes | Current form version from `GET \u002Fv1\u002Fcrm-forms\u002F:id` |\n| `click.settings.type` | string \u002F null | no | `popup`, `panel` |\n| `click.settings.position` | string \u002F null | no | `left`, `center`, `right` |\n| `click.settings.vertical` | string \u002F null | no | `bottom`, `top` |\n| `auto.settings.type` | string \u002F null | no | `popup`, `panel` |\n| `auto.settings.position` | string \u002F null | no | `left`, `center`, `right` |\n| `auto.settings.vertical` | string \u002F null | no | `bottom`, `top` |\n| `click.settings.button.use` | boolean \u002F null | no | Use the generated button |\n| `click.settings.button.text` | string \u002F null | no | Button caption |\n| `click.settings.button.font` | string \u002F null | no | `modern`, `classic`, `elegant` |\n| `click.settings.button.align` | string \u002F null | no | `inline`, `left`, `center`, `right` |\n| `click.settings.button.plain` | boolean \u002F null | no | Plain button style |\n| `click.settings.button.rounded` | boolean \u002F null | no | Rounded button corners |\n| `click.settings.button.outlined` | boolean \u002F null | no | Outlined button |\n| `click.settings.button.decoration` | string \u002F null | no | Decoration, for example `dotted`, `solid`, or an empty string |\n| `click.settings.button.color.text` | string \u002F null | no | Text color. Hex: `#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA` |\n| `click.settings.button.color.textHover` | string \u002F null | no | Text color on hover. Hex: `#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA` |\n| `click.settings.button.color.background` | string \u002F null | no | Background color. Hex: `#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA` |\n| `click.settings.button.color.backgroundHover` | string \u002F null | no | Background color on hover. Hex: `#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA` |\n| `auto.settings.delay` | integer \u002F null | no | Seconds: `3`, `5`, `7`, `10`, `15`, `20`, `25`, `30`, `40`, `60`, `120` |\n\nBitrix24 decides which properties can be written. Embedding response fields do not define a local list of writable settings.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F59\u002Fembedding\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"updatedTime\": \"YOUR_UPDATED_TIME\",\n  \"auto\": {\n    \"settings\": {\n      \"delay\": 10\n    }\n  },\n  \"click\": {\n    \"settings\": {\n      \"button\": {\n        \"text\": \"Write us\"\n      }\n    }\n  }\n}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F59\u002Fembedding\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"updatedTime\": \"YOUR_UPDATED_TIME\",\n  \"auto\": {\n    \"settings\": {\n      \"delay\": 10\n    }\n  },\n  \"click\": {\n    \"settings\": {\n      \"button\": {\n        \"text\": \"Write us\"\n      }\n    }\n  }\n}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F59\u002Fembedding', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    updatedTime: 'YOUR_UPDATED_TIME',\n    auto: { settings: { delay: 10 } },\n    click: { settings: { button: { text: 'Write us' } } },\n  }),\n})\n\nconst { success, data, meta } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F59\u002Fembedding', {\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    updatedTime: 'YOUR_UPDATED_TIME',\n    auto: { settings: { delay: 10 } },\n    click: { settings: { button: { text: 'Write us' } } },\n  }),\n})\n\nconst { success, data, meta } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|---|---|---|\n| `success` | boolean | `true` on success |\n| `data` | object | Embedding settings as returned by Bitrix24 after the write, or `{id}` if the additional read fails |\n| `data.id` | number | Form ID when the additional read fails |\n| `meta.warnings` | object[] | A confirmed write remains successful if the additional read fails. `CRM_FORM_READBACK_FAILED` instructs the client to GET the form and embedding before another change, without repeating the write |\n| `meta.redacted` | string[] | Paths with connection credentials replaced. Such a response is not a complete configuration for saving back |\n| `data.formActive` | boolean | Whether the form is active |\n| `data.resourcesReady` | boolean | Whether form resources are ready |\n| `data.publicUrl` | string | Public form URL, including its public signature |\n| `data.inline` | object | Form embedded in the page |\n| `data.click` | object | Form opened on click |\n| `data.auto` | object | Form opened after a delay |\n| `data.\u003Cvariant>.code` | string \u002F null | HTML embed code, or `null` when resources are not ready |\n| `data.\u003Cvariant>.previewUrl` | string | Preview URL when supplied. Missing fields and `null` values are preserved |\n| `data.\u003Cvariant>.settings` | object \u002F null | Current settings as returned by Bitrix24, including `null` |\n| `data.\u003Cvariant>.options` | object \u002F null | Allowed values returned by Bitrix24, including `null` |\n| `data.\u003Cvariant>.options.type` | string[] | `popup`, `panel` |\n| `data.\u003Cvariant>.options.position` | string[] | `left`, `center`, `right` |\n| `data.\u003Cvariant>.options.vertical` | string[] | `bottom`, `top` |\n| `data.click.options.button.font` | string[] | `modern`, `classic`, `elegant` |\n| `data.click.options.button.align` | string[] | `inline`, `left`, `center`, `right` |\n| `data.auto.options.delay` | number[] | `3`, `5`, `7`, `10`, `15`, `20`, `25`, `30`, `40`, `60`, `120` |\n\n## Response example\n\nPublic domains and signatures in this example are placeholders.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"formActive\": true,\n    \"resourcesReady\": true,\n    \"publicUrl\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fcrm_form_nfby7\u002F?telemetry_sign=DUMMY_PUBLIC_SIGNATURE\",\n    \"inline\": {\n      \"code\": \"\u003Cscript data-b24-form=\\\"inline\u002F59\u002Fp4yyaj\\\" data-b24-form-telemetry-sign=\\\"DUMMY_PUBLIC_SIGNATURE\\\" data-skip-moving=\\\"true\\\">\\n\\t(function(w,d,u){\\n\\t\\tvar s=d.createElement('script');s.async=true;s.src=u+'?'+(Date.now()\u002F180000|0);\\n\\t\\tvar h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);\\n\\t})(window,document,'https:\u002F\u002Fcdn.example.com\u002Fb13743910\u002Fcrm\u002Fform\u002Floader_59.js');\\n\u003C\u002Fscript>\",\n      \"previewUrl\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fpub\u002Fform\u002F59_probe\u002Fp4yyaj\u002F?view=preview&preview=inline\",\n      \"settings\": null,\n      \"options\": null\n    },\n    \"click\": {\n      \"code\": \"\u003Cscript data-b24-form=\\\"click\u002F59\u002Fp4yyaj\\\" data-b24-form-telemetry-sign=\\\"DUMMY_PUBLIC_SIGNATURE\\\" data-skip-moving=\\\"true\\\">\\n\\t(function(w,d,u){\\n\\t\\tvar s=d.createElement('script');s.async=true;s.src=u+'?'+(Date.now()\u002F180000|0);\\n\\t\\tvar h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);\\n\\t})(window,document,'https:\u002F\u002Fcdn.example.com\u002Fb13743910\u002Fcrm\u002Fform\u002Floader_59.js');\\n\u003C\u002Fscript>\",\n      \"previewUrl\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fpub\u002Fform\u002F59_probe\u002Fp4yyaj\u002F?view=preview&preview=click\",\n      \"settings\": {\n        \"type\": \"panel\",\n        \"position\": \"right\",\n        \"vertical\": \"bottom\",\n        \"button\": {\n          \"use\": true,\n          \"text\": \"Write us\",\n          \"font\": null,\n          \"align\": null,\n          \"plain\": false,\n          \"rounded\": false,\n          \"outlined\": false,\n          \"decoration\": null,\n          \"color\": {\n            \"text\": null,\n            \"textHover\": null,\n            \"background\": null,\n            \"backgroundHover\": null\n          }\n        }\n      },\n      \"options\": {\n        \"type\": [\n          \"popup\",\n          \"panel\"\n        ],\n        \"position\": [\n          \"left\",\n          \"center\",\n          \"right\"\n        ],\n        \"vertical\": [\n          \"bottom\",\n          \"top\"\n        ],\n        \"button\": {\n          \"font\": [\n            \"modern\",\n            \"classic\",\n            \"elegant\"\n          ],\n          \"align\": [\n            \"inline\",\n            \"left\",\n            \"center\",\n            \"right\"\n          ]\n        }\n      }\n    },\n    \"auto\": {\n      \"code\": \"\u003Cscript data-b24-form=\\\"auto\u002F59\u002Fp4yyaj\\\" data-b24-form-telemetry-sign=\\\"DUMMY_PUBLIC_SIGNATURE\\\" data-skip-moving=\\\"true\\\">\\n\\t(function(w,d,u){\\n\\t\\tvar s=d.createElement('script');s.async=true;s.src=u+'?'+(Date.now()\u002F180000|0);\\n\\t\\tvar h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);\\n\\t})(window,document,'https:\u002F\u002Fcdn.example.com\u002Fb13743910\u002Fcrm\u002Fform\u002Floader_59.js');\\n\u003C\u002Fscript>\",\n      \"previewUrl\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fpub\u002Fform\u002F59_probe\u002Fp4yyaj\u002F?view=preview&preview=auto\",\n      \"settings\": {\n        \"type\": \"popup\",\n        \"position\": \"right\",\n        \"vertical\": \"bottom\",\n        \"delay\": 10\n      },\n      \"options\": {\n        \"type\": [\n          \"popup\",\n          \"panel\"\n        ],\n        \"position\": [\n          \"left\",\n          \"center\",\n          \"right\"\n        ],\n        \"vertical\": [\n          \"bottom\",\n          \"top\"\n        ],\n        \"delay\": [\n          3,\n          5,\n          7,\n          10,\n          15,\n          20,\n          25,\n          30,\n          40,\n          60,\n          120\n        ]\n      }\n    }\n  }\n}\n```\n\n## Error response example\n\n400 — `updatedTime` is missing:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"updatedTime from GET \u002Fv1\u002Fcrm-forms\u002F:id is required\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | Invalid form ID or request structure |\n| 400 | `INVALID_PARAMS` | Unknown query parameter or invalid request structure |\n| 400 | `INVALID_PARAMS` | `updatedTime` is missing |\n| 400 | `INVALID_PARAMS` | Bitrix24 rejected a setting. Field diagnostics are returned in `error.validation` and the original code in `error.b24Code` |\n| 409 | `CRM_FORM_REST_NOT_ENABLED` | CRM form REST methods are disabled on the Bitrix24 account. The original code for the missing method is in `error.b24Code` |\n| 403 | `BITRIX_INSUFFICIENT_SCOPE` | The Bitrix24 token lacks the required scope. The original code is in `error.b24Code` |\n| 404 | `ENTITY_NOT_FOUND` | Form not found |\n| 402 | `CRM_FORM_WRITE_RESTRICTED` | The Bitrix24 plan (free or demo) does not allow writing CRM forms |\n| 403 | `SCOPE_DENIED` | API key lacks the `crm` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | The user lacks access permissions |\n| 403 | `CRM_FORM_SYSTEM_IMMUTABLE` | The form is a system form — `system: true` in the [form list](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | API key is read-only |\n| 409 | `CRM_FORM_VERSION_MISMATCH` | The form was modified after the passed `updatedTime`. The current modification time is in `error.currentUpdatedTime` |\n| 401 | `TOKEN_MISSING` | API key has no configured credentials |\n| 500 | `CRM_FORM_SIDE_EFFECT_FAILED` | The changes are already written, but a subsequent step on the Bitrix24 side failed. Read the form before retrying |\n| 502 | `BITRIX_UNAVAILABLE` | Invalid embedding response |\n\nErrors from Bitrix24 include the original `error.b24Code` and field diagnostics in `error.validation`, when supplied. For common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nThe embedding response does not include `updatedTime`. Before the next embedding or form update, read the form with [Get form](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fget). If `meta.warnings` reports a failed read, the write has already succeeded: do not repeat it. Re-read the form and embedding.\n\nEmbedding objects retain their original fields. A `resourcesReady: false` or `code: null` supplied by Bitrix24 remains a successful response. Only current connection credentials are replaced, with their paths listed in `meta.redacted`.\n\n## See also\n\n- [Get form](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fget)\n- [Get form embedding codes](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fembedding)\n","## List website widgets for a form\n\n`GET \u002Fv1\u002Fcrm-forms\u002F:id\u002Fsite-buttons`\n\nReturns the website widgets in the Bitrix24 account and their association with the selected CRM form.\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|-----|--------|-----------|-------------|\n| `id` (path) | number | yes | — | Positive integer form ID. Source: [List CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n| `limit` (query) | number | no | Bitrix24 default | Requested page size. Bitrix24 validates the value |\n| `offset` (query) | number | no | Bitrix24 default | Requested offset. Bitrix24 validates the value |\n| `order` \u002F `sort` (query) | object \u002F string | no | Bitrix24 default | Sort by ID: `order[id]=desc` or `sort=-id` |\n\nPagination: each request retrieves one page. Omit `limit` and `offset` to use the Bitrix24 defaults. Either parameter can be sent separately. Pages are not fetched automatically. `select` is not supported.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F91\u002Fsite-buttons?sort=-id\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F91\u002Fsite-buttons?sort=-id\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F91\u002Fsite-buttons?sort=-id', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data, meta } = await res.json()\nconsole.log(data)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F91\u002Fsite-buttons?sort=-id', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data, meta } = await res.json()\nconsole.log(data)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|-------------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | Array of website widgets |\n| `data[].formId` | number | Requested form ID. Source: [List CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n| `data[].id` | number | Widget ID from this list |\n| `data[].name` | string | Name as returned by Bitrix24. Only credentials of the current connection are replaced; their paths are listed in `meta.redacted` |\n| `data[].bound` | boolean | Whether the item is associated with the requested form |\n| `data[].system` | boolean | Whether this is a system widget |\n| `data[].formsId` | number[] | IDs of forms associated with the widget. Source: [List CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n| `data[].previewUrl` | string \\| null | Public preview URL, returned unchanged. `null` when no preview is available |\n| `meta.limit` | number | Page size when supplied in the Bitrix24 response |\n| `meta.offset` | number | Offset when supplied in the Bitrix24 response |\n| `meta.total` | number | Total record count. Omitted when the source does not supply a count |\n| `meta.redacted` | string[] | Paths where current connection credentials were replaced |\n\n## Response example\n\nThe first two items are shown. Public domains and signatures are placeholders.\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"formId\": 91,\n      \"id\": 3,\n      \"name\": \"Wix\",\n      \"system\": false,\n      \"bound\": false,\n      \"formsId\": [\n        1\n      ],\n      \"previewUrl\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fpub\u002Fform\u002F91\u002FDUMMY_PUBLIC_SIGNATURE\u002F?view=preview&preview=button&preview_id=3\"\n    },\n    {\n      \"formId\": 91,\n      \"id\": 1,\n      \"name\": \"Website widget\",\n      \"system\": true,\n      \"bound\": false,\n      \"formsId\": [\n        3\n      ],\n      \"previewUrl\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fpub\u002Fform\u002F91\u002FDUMMY_PUBLIC_SIGNATURE\u002F?view=preview&preview=button&preview_id=1\"\n    }\n  ]\n}\n```\n\n## Error response example\n\n400 — the form ID is not a positive integer:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"id must be a positive safe integer\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|-------------|\n| 400 | `INVALID_PARAMS` | The form `id` is not a positive integer |\n| 400 | `INVALID_PARAMS` | Unknown query parameter, or an invalid `order` or `sort` structure |\n| 400 | `INVALID_PARAMS` | Both `order[...]` and `sort` were supplied |\n| 400 | `INVALID_PARAMS` | Bitrix24 rejected the sorting or the pagination, for example a non-numeric `limit` or `offset`. The original code is in `error.b24Code` and field diagnostics are in `error.validation` |\n| 401 | `TOKEN_MISSING` | Bitrix24 credentials are missing or no OAuth session was provided |\n| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | The Bitrix24 user lacks read permission |\n| 409 | `CRM_FORM_REST_NOT_ENABLED` | CRM form REST methods are disabled on the Bitrix24 account. The original code for the missing method is in `error.b24Code` |\n| 403 | `BITRIX_INSUFFICIENT_SCOPE` | The Bitrix24 token lacks the required scope. The original code is in `error.b24Code` |\n| 404 | `ENTITY_NOT_FOUND` | Form not found |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request |\n| 429 | `RATE_LIMITED` | Rate limit exceeded. Retry after the interval in `Retry-After` |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned an invalid response |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond within the time limit. Retry the read after the interval in `Retry-After` |\n\nErrors from Bitrix24 include the original `error.b24Code` and field diagnostics in `error.validation`, when supplied. For common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nThe list includes all website widgets in the Bitrix24 account, including items with `bound: false`. To select items associated with the form, keep entries with `bound: true` in the response array. A `bound` query parameter is not supported.\n\nRequires the `crm` scope. Keys in `READONLY` mode can use this endpoint. Reading does not change item settings.\n\n## See also\n\n- [List CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist)\n- [Form embedding](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fembedding)\n- [CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms)\n","## List Open Channels for a form\n\n`GET \u002Fv1\u002Fcrm-forms\u002F:id\u002Fopenlines`\n\nReturns the Open Channels in the Bitrix24 account and their association with the selected CRM form.\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|-----|--------|-----------|-------------|\n| `id` (path) | number | yes | — | Positive integer form ID. Source: [List CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n| `limit` (query) | number | no | Bitrix24 default | Requested page size. Bitrix24 validates the value |\n| `offset` (query) | number | no | Bitrix24 default | Requested offset. Bitrix24 validates the value |\n| `order` \u002F `sort` (query) | object \u002F string | no | Bitrix24 default | Sort by ID: `order[id]=desc` or `sort=-id` |\n\nPagination: each request retrieves one page. Omit `limit` and `offset` to use the Bitrix24 defaults. Either parameter can be sent separately. Pages are not fetched automatically. `select` is not supported.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F91\u002Fopenlines?sort=-id\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F91\u002Fopenlines?sort=-id\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F91\u002Fopenlines?sort=-id', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data, meta } = await res.json()\nconsole.log(data)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F91\u002Fopenlines?sort=-id', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data, meta } = await res.json()\nconsole.log(data)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|-------------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | Array of Open Channels |\n| `data[].formId` | number | Requested form ID. Source: [List CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n| `data[].id` | number | Open Channel ID from this list |\n| `data[].name` | string | Name as returned by Bitrix24. Only credentials of the current connection are replaced, with paths listed in `meta.redacted` |\n| `data[].bound` | boolean | Whether the item is associated with the requested form |\n| `data[].welcomeFormEnabled` | boolean | Whether the welcome form is enabled |\n| `data[].welcomeFormId` | number \\| null | Welcome form ID. `null` when there is no welcome form. Source: [List CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n| `data[].welcomeFormDelayed` | boolean | Whether the welcome form is shown with a delay |\n| `data[].previewUrl` | string \\| null | Public preview URL, returned unchanged. `null` when no preview is available |\n| `meta.limit` | number | Page size when supplied in the Bitrix24 response |\n| `meta.offset` | number | Offset when supplied in the Bitrix24 response |\n| `meta.total` | number | Total record count. Omitted when the source does not supply a count |\n| `meta.redacted` | string[] | Paths where current connection credentials were replaced |\n\n## Response example\n\nThe first two items are shown. Public domains and signatures are placeholders.\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"formId\": 91,\n      \"id\": 59,\n      \"name\": \"Support\",\n      \"bound\": false,\n      \"welcomeFormEnabled\": true,\n      \"welcomeFormId\": 25,\n      \"welcomeFormDelayed\": true,\n      \"previewUrl\": null\n    },\n    {\n      \"formId\": 91,\n      \"id\": 45,\n      \"name\": \"Sales\",\n      \"bound\": false,\n      \"welcomeFormEnabled\": true,\n      \"welcomeFormId\": 25,\n      \"welcomeFormDelayed\": true,\n      \"previewUrl\": null\n    }\n  ]\n}\n```\n\n## Error response example\n\n400 — the form ID is not a positive integer:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"id must be a positive safe integer\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|-------------|\n| 400 | `INVALID_PARAMS` | The form `id` is not a positive integer |\n| 400 | `INVALID_PARAMS` | Unknown query parameter, or an invalid `order` or `sort` structure |\n| 400 | `INVALID_PARAMS` | Both `order[...]` and `sort` were supplied |\n| 400 | `INVALID_PARAMS` | Bitrix24 rejected the sorting or the pagination, for example a non-numeric `limit` or `offset`. The original code is in `error.b24Code` and field diagnostics are in `error.validation` |\n| 401 | `TOKEN_MISSING` | Bitrix24 credentials are missing or no OAuth session was provided |\n| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | The Bitrix24 user lacks read permission |\n| 409 | `CRM_FORM_REST_NOT_ENABLED` | CRM form REST methods are disabled on the Bitrix24 account. The original code for the missing method is in `error.b24Code` |\n| 403 | `BITRIX_INSUFFICIENT_SCOPE` | The Bitrix24 token lacks the required scope. The original code is in `error.b24Code` |\n| 404 | `ENTITY_NOT_FOUND` | Form not found |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request |\n| 429 | `RATE_LIMITED` | Rate limit exceeded. Retry after the interval in `Retry-After` |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned an invalid response |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond within the time limit. Retry the read after the interval in `Retry-After` |\n\nErrors from Bitrix24 include the original `error.b24Code` and field diagnostics in `error.validation`, when supplied. For common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nThe list includes all Open Channels in the Bitrix24 account, including items with `bound: false`. To select items associated with the form, keep entries with `bound: true` in the response array. A `bound` query parameter is not supported.\n\nRequires the `crm` scope. Keys in `READONLY` mode can use this endpoint. Reading does not change item settings.\n\n## See also\n\n- [List CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist)\n- [Form embedding](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fembedding)\n- [CRM forms](\u002Fdocs\u002Fentities\u002Fcrm-forms)\n","## Submit visitor data\n\n`POST \u002Fv1\u002Fcrm-forms\u002F:id\u002Fresults`\n\nSubmits CRM form field values on behalf of a visitor, as when the form is filled in on a website. The result is processed according to the form settings: it can create a lead or deal, trigger automation and send notifications to the responsible persons.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | integer | yes | Form ID. List: [Form list](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `fields` | object | yes | Non-empty object of values. Keys are form field names `fields[].name` from [Get a form](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fget), for example `LEAD_NAME`, `LEAD_PHONE`. Fields of type `file` are not supported |\n| `presets` | object | no | Preset values, passed unchanged |\n| `fromUrl` | string | no | URL of the page where the form was filled in |\n\nNo other fields are accepted in the body. The set and values of fields are validated against the form settings.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F75\u002Fresults\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"fields\":{\"LEAD_NAME\":\"Anna\",\"LEAD_PHONE\":\"+12025550123\"},\"fromUrl\":\"https:\u002F\u002Fexample.com\u002Fcontact\"}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F75\u002Fresults\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"fields\":{\"LEAD_NAME\":\"Anna\",\"LEAD_PHONE\":\"+12025550123\"},\"fromUrl\":\"https:\u002F\u002Fexample.com\u002Fcontact\"}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F75\u002Fresults', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    fields: { LEAD_NAME: 'Anna', LEAD_PHONE: '+12025550123' },\n    fromUrl: 'https:\u002F\u002Fexample.com\u002Fcontact',\n  }),\n})\n\nconst { data } = await res.json()\nconsole.log('Form result:', data.resultId)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-forms\u002F75\u002Fresults', {\n  method: 'POST',\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    fields: { LEAD_NAME: 'Anna', LEAD_PHONE: '+12025550123' },\n    fromUrl: 'https:\u002F\u002Fexample.com\u002Fcontact',\n  }),\n})\n\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` when the result is saved |\n| `data.resultId` | number | ID of the form submission result. This is not the ID of the created lead or deal |\n\n## Response example\n\nHTTP 201 — the result is saved:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"resultId\": 231\n  }\n}\n```\n\n## Error response example\n\n404 — no form with this `id`:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Form not found.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `MISSING_REQUIRED_FIELDS` | `fields` is not passed, is empty or is not an object, message \"fields must be a non-empty object\" |\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer, message \"id must be a positive safe integer\" |\n| 400 | `INVALID_PARAMS` | The body is not a JSON object, message \"Request body must be a JSON object\" |\n| 400 | `INVALID_PARAMS` | The body contains a field other than `fields`, `presets`, `fromUrl`, message \"Only fields, presets and fromUrl are accepted\" |\n| 400 | `INVALID_PARAMS` | `presets` is not an object or `fromUrl` is not a string |\n| 404 | `ENTITY_NOT_FOUND` | No form with this `id`, message \"Form not found.\" |\n| 422 | `BITRIX_ERROR` | Bitrix24 did not accept the result: the form is inactive (\"Form is not active.\") or a field of type `file` is passed. The Bitrix24 text comes in `message` and the original code in `b24Code` (`ERROR_CORE` for an inactive form) |\n| 403 | Bitrix24 code | Bitrix24 denied access. `code` and `message` come from Bitrix24 unchanged |\n| 409 | Bitrix24 code | Bitrix24 rejected the result because of the form or portal state. `code` and `message` come from Bitrix24 unchanged |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only. Submitting requires a key with write access |\n| 429 | `RATE_LIMITED` | The Bitrix24 request rate limit is exceeded |\n| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 did not return a result ID, message `Bitrix24 returned no result ID; do not retry blindly` |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable: it responded with a server error or the connection dropped |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 accepted the request but did not respond within the allotted time |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `TOKEN_MISSING` | The API key has no configured Bitrix24 tokens |\n| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **Do not retry a submission blindly.** Each call saves a new result, and Vibecode does not retry the submission itself. After `502`, `503` or a dropped connection, the result may already be saved and may have triggered automation, so a repeated call creates a second result.\n- **Unknown `fields` keys are not rejected.** A value with a name that does not exist in the form does not cause an error: the result is created and `201` is returned. Check the keys against the form's `fields[].name` before submitting.\n\n## See also\n\n- [Get a form](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Fget)\n- [Form list](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Flist)\n- [Activate a form](\u002Fdocs\u002Fentities\u002Fcrm-forms\u002Factivate)\n- [Send a CRM form to a client](\u002Fdocs\u002Fopenlines\u002Fsend-form)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n",1794739355406]