DocsGetting started

Put a signup form on your website

Embed Sumezi's signup widget with one script tag.

Last updated 27 July 2026 5 min read Getting started

What the widget does

The signup widget is a small, dependency-free script served from /embed/form.js. Drop it into any page and it renders a ready-to-use form: a name field (optional), an email field (required), a consent line, and a submit button. It's tied to one project through your public token, so every signup lands straight in that project's subscriber list.

Where to find your snippet: open Subscribers in the app. Its signup widget panel already has your project's public token filled into ready-to-copy snippets — for the script tag below, the hosted page, and a plain HTML form.

Add it to your site

There are two ways to place the widget, both driven by the same script. Use whichever fits how your page is built.

Script-tag mode — simplest

Paste it exactly where the form should appear on the page — the widget renders itself right there, immediately after the tag.

HTML — script tag
<script src="https://sumezi.com/embed/form.js" data-token="<public_token>" data-lang="en"></script>

Container mode — place it anywhere

Use this when the script tag itself can't reach the right spot — for example inside a component in a page builder or CMS. Add a container element with the same data attributes, and load the script separately (without data-token on the script tag itself).

HTML — container + script
<div class="sumezi-form" data-token="<public_token>" data-lang="en"></div>
<script src="https://sumezi.com/embed/form.js"></script>
AttributeValues
data-tokenyour public token
data-langnl, en, or de
data-unstyled1

Style it to match your site

By default the widget injects a small, neutral stylesheet driven entirely by three CSS custom properties, so you can restyle it without fighting CSS specificity. Set them on .sumezi-form-root, the wrapper the widget creates around the form.

Custom propertyDefault
--sumezi-accent#FF9617
--sumezi-radius8px
--sumezi-fontinherit

Prefer full control? Set data-unstyled="1" on the script tag or the container, and the widget skips injecting its default stylesheet entirely. It still emits the same semantic classes — .sumezi-form-el, .sumezi-form-input, .sumezi-form-button, .sumezi-form-message — with no inline styles, so you can style every element from scratch in your own stylesheet.

What happens after someone signs up

A submission posts straight to /api/subscribe/{your_token} — no page reload, no authentication. Sumezi creates the subscriber as pending and, if your project has sending set up, emails a confirmation link straight away. Only after that link is clicked does the subscriber become subscribed and get enrolled in your welcome automation, if you have one. If the email is already subscribed, the widget still reports success but skips sending another confirmation.

Two anti-bot checks run before anything is stored: a hidden website field that only a bot would fill in, and a timing check — a submission faster than 3 seconds or older than 24 hours after the form loaded is treated the same way. Both fail silently: the widget shows the normal success message with zero side effects, so a bot can't tell it was blocked. On top of that, submissions are capped at 10 per hour per IP address, across all your forms.

Signups can be paused automatically: if sending isn't configured yet for your project, or your plan's subscriber limit is reached, submissions still validate normally but nothing gets stored or sent — the visitor sees an error instead of a silent failure.

No script tag? Use the hosted page

Every project also gets a standalone signup page at /subscribe/{your_token} — no embedding required. It's styled with Sumezi's own design system, works without JavaScript, and runs through the exact same double opt-in, rate limiting, and anti-bot checks as the widget. Share the link directly, or put it in a social bio or email signature.

There's a third option too, for sites that want a form but no JavaScript at all: a plain HTML form that posts directly to the same subscribe endpoint. All three snippets — script tag, hosted link, and plain form — are on the widget panel in Subscribers, already filled in with your token.

Troubleshooting

Back to Docs
Was this helpful?