Embedding forms

One snippet turns any static page into structured intake: your marketing site, a client's WordPress blog, a Notion-published page, the plain HTML brochure site an agency shipped in 2019. Visitors see a form; you see records flowing onto a board, triggering webhooks, ready for your team or an AI agent — with zero backend on the embedding site.

How it works

Each form in Snapi has a public submission endpoint:

POST https://api.snapi.ca/api/v1/public/submit/:entityId

The embed script renders your form automatically from its field schema and posts to this endpoint. Records appear in your workspace in real time.

Getting the embed snippet

  1. Open your workspace and navigate to Forms.
  2. Click the form you want to embed.
  3. Click the Share / Embed button in the top-right toolbar.
  4. Copy the snippet from the Embed tab.

The snippet looks like this:

<script
  src="https://app.snapi.ca/embed.js"
  data-entity="ent_abc123xyz"
  data-theme="light"
  defer>
</script>

<div id="snapi-form"></div>

Attributes

Attribute Required Description
data-entity Yes Your form ID (starts with ent_)
data-theme No light (default) or dark
data-redirect No URL to redirect the visitor after a successful submission
data-success-msg No Custom text shown after submission (default: "Thank you!")

iframe embed

If you prefer an iframe over a script tag (e.g. for stricter CSP policies), copy the snippet from your form's Public Form tab. The URL includes your organization and form slugs:

<iframe
  src="https://app.snapi.ca/embed/your-org/contact-form"
  width="100%"
  height="600"
  frameborder="0"
  style="border:none;border-radius:8px;">
</iframe>
i
Always copy the snippet from the app rather than constructing the URL by hand — the org slug in the path matters (form slugs are only unique within your organization).

Restricting where your form can be used

Set Allowed Domains in the form's Public Form tab (e.g. example.com, another.com) to control where the form works. Enforcement happens in two places:

Subdomains are included automatically (example.com also allows www.example.com). Leave the field empty to allow embedding anywhere.

Gotchas

Styling the embedded form

The embed script injects a shadow DOM component, so your page's CSS won't interfere with it. You can control appearance using the data-theme attribute or the following CSS custom properties placed on the host #snapi-form element:

#snapi-form {
  --snapi-accent: #2551ed;
  --snapi-radius: 8px;
  --snapi-font: 'Inter', sans-serif;
}

Submission quotas

Public form submissions count toward your plan's monthly submission quota. When the quota is reached, the embed shows a "form temporarily unavailable" message to visitors.

Plan Submissions / month
Free500
Starter5,000
Team25,000

Quotas reset on the first of each month. See Plans & limits for the full comparison.

Spam and rate limiting

The public submit endpoint is IP-rate-limited (60 requests per 15 minutes per IP) regardless of plan. For high-volume use cases, authenticated API access via an API key is recommended instead.

Receiving submissions in real time

Every submission triggers your form's configured webhooks (Starter and Team plans). You can use a post-submit webhook to send confirmation emails, sync to a CRM, or trigger automation in n8n.

!
CORS: The public form endpoints accept requests from any origin by design — that's what makes embedding work. Use Allowed Domains (above) to restrict which sites can use your form.