Put a signup form on your website
Embed Sumezi's signup widget with one script tag.
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.
<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).
<div class="sumezi-form" data-token="<public_token>" data-lang="en"></div> <script src="https://sumezi.com/embed/form.js"></script>
| Attribute | Values |
|---|---|
| data-token | your public token |
| data-lang | nl, en, or de |
| data-unstyled | 1 |
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 property | Default |
|---|---|
| --sumezi-accent | #FF9617 |
| --sumezi-radius | 8px |
| --sumezi-font | inherit |
--sumezi-accent— the button background and the input focus outline color.--sumezi-radius— the corner rounding on inputs and the button.--sumezi-font— the font family; defaults to inherit so it automatically picks up your site's own font.
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
- Nothing renders at all: the widget silently does nothing if
data-tokenis missing or wrong — check it matches your project's token exactly. - A duplicated script tag re-renders the form: it doesn't — the widget marks every container as rendered once it builds the form, so re-running the script (e.g. after a client-side page transition) skips containers it already handled instead of wiping out what a visitor typed.
- Generic error even though the email looks valid: the widget only has specific copy for too many attempts (429), an unready list (503), and a bad email (400) — anything else, including a plan limit being reached, falls back to a generic error message.
- "Too many attempts" (429): the public endpoint allows 10 submissions per hour per IP address, shared across every form on your account. Wait and try again.
- "Signups are not available for this list yet" (503): your project's sending isn't configured, or its sending domain hasn't finished verifying — signups are refused rather than silently accepted with no way to confirm them.
- Custom CSS doesn't apply: the widget's injected default stylesheet already styles every element — override the look with
--sumezi-accent,--sumezi-radius, and--sumezi-fonton.sumezi-form-root, or setdata-unstyled="1"to skip the default styles entirely and style the semantic classes yourself.