Skip to main content
A Form has three doors. The first, the link https://trybrein.com/f/<id>, needs no code. This page covers the other two. To create the form, go to capturing contacts. The <id> is the form’s public id (frm_ and ten characters). It does not change.

Embed it on your site

Paste this where you want the form:
With popup also: window.BreinForms.open("frm_AbC123dEf4"). Allowed domains. If you set domains on the form, only those sites can show it; a submission from another site answers 403. One domain per line; *.domain.mx accepts subdomains. Event. When a response is accepted, brein:submitted fires with detail.formId and detail.responseId:

Send it from your server

If you want your own HTML, your server sends each Response to Brein with the form’s key:
The key. In Brein open Share → From your server and create a frm_sk_… key. It is shown only once. Store it in your secret manager. Revoke it in the same dialog. Never put it in a browser or a repository. The submission.
answers uses the question keys as its keys (you see them in the same dialog). consent.privacy must be true. With the same Idempotency-Key you get the same Response. A correct submission answers 202:
A multiple-choice question is sent as a list. The form shows your company’s privacy notice. It cannot be published without that link. Without consent, the submission is refused with 422. A person unsubscribed from email reaches your contacts but receives no Sequences; whoever asked to delete their data is not saved. Brein stores the source page, the referrer and the utm_*, and only a hash of the IP.