# Publishing and results

Get 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.

Bitrix24 API: `crm.form.embedding.*`, `crm.form.sitebutton.list`, `crm.form.openline.list`, `crm.webform.result.add`
Scope: `crm`

Visitor data submission uses REST v2. Embedding and association lists use REST v3.

## Operations

- [Embedding code](./embedding.md) — `GET /v1/crm-forms/:id/embedding`
- [Embedding settings](./embedding-update.md) — `PATCH /v1/crm-forms/:id/embedding`
- [Website widgets](./site-buttons.md) — `GET /v1/crm-forms/:id/site-buttons`
- [Get Open Channels for a form](./openlines.md) — `GET /v1/crm-forms/:id/openlines`
- [Submit visitor data](./results.md) — `POST /v1/crm-forms/:id/results`

## Typical scenario

1. Activate the form in [form management](/docs/entities/crm-forms/management).
2. 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.
3. Submit visitor values from your own interface through `POST /v1/crm-forms/:id/results`, or send the form to a customer in an [Open Channel](/docs/openlines/send-form).

## See also

- [Form management](/docs/entities/crm-forms/management)
- [Builder dictionaries](/docs/entities/crm-forms/builder)
- [CRM forms](/docs/entities/crm-forms)
