Docs
Embedding Webinarclose on your own site
Webinarclose can run underneath your website. Visitors register on your site, and their personal link takes them to the right screen: waiting room, live player or the ended page.
There are four ways to use it. Mix them as you like. The examples use https://api.webinarclose.com; if you host it yourself, use your own address.
| You want | Use |
|---|---|
| A form on your site, no coding | 1. Drop-in script |
| Your own form, your own design | 2. Public API |
| The player inside your own page | 3. Embedded player |
| A ready registration page | 4. Hosted page |
Setup (once per account)
Every account has a publishable key (wc_pub_...). It is public: put it in your HTML. It can only read public webinar info and register attendees. It cannot list attendees, read reports or change anything.
Tell Webinarclose which sites may use it (PUT /v1/embed). Origins must match exactly: scheme, host and port, no path, no trailing slash. https://example.com and https://www.example.com are two origins.
B=https://api.webinarclose.com
curl -s -XPUT $B/v1/embed -H "Authorization: Bearer wc_live_..." -H 'Content-Type: application/json' \
-d '{"allowed_origins":["https://www.example.com","https://example.com"]}'
# -> {"publishable_key":"wc_pub_...","allowed_origins":[...]}
A browser request from any other site gets 403 origin_not_allowed, and the embedded player cannot be framed by it. Requests without an Origin header (curl, your own server) are allowed.
1. Drop-in script
<div data-webinarclose-register="WEBINAR_ID" data-key="wc_pub_..."></div>
<script src="https://api.webinarclose.com/embed.js" async></script>
This renders an accessible, mobile-first form (name, email, optional consent checkbox) in a shadow root, so your CSS and ours do not clash. It uses the brand colour, language and consent text from the webinar page settings. Optional attributes:
| Attribute | Effect |
|---|---|
data-redirect | After registering, go to this URL with ?wc_token=... appended. Example: https://www.example.com/ |
data-consent | Consent checkbox text (overrides the page setting). Example: Send me tips (optional) |
data-lang | Form language: en or nl. Example: nl |
data-color | Button colour; text turns black or white for contrast. Example: #0a7c66 |
Without data-redirect the form shows the confirmation in place: calendar buttons (.ics and Google Calendar) and a link to the personal webinar page. The element also fires a webinarclose:registered event with the response, for your analytics.
2. Public API (build your own form)
Two endpoints, both with the publishable key as a Bearer token: GET /public/v1/webinars/{id} and POST /public/v1/webinars/{id}/registrations.
# public info: title, start, status, brand colour, page fields
curl -s $B/public/v1/webinars/WEBINAR_ID -H "Authorization: Bearer wc_pub_..."
# register (idempotent per email: a repeat gets 202 and the link by email, never in the response)
curl -s -XPOST $B/public/v1/webinars/WEBINAR_ID/registrations \
-H "Authorization: Bearer wc_pub_..." -H 'Content-Type: application/json' \
-d '{"name":"Ann","email":"ann@example.com","consent":true}'
const res = await fetch(`${BASE}/public/v1/webinars/${WEBINAR_ID}/registrations`, {
method: 'POST',
headers: { Authorization: `Bearer ${PUBLISHABLE_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ name, email, consent, website: honeypotValue }),
});
if (res.status === 201) {
const r = await res.json();
// r.join_url personal link: waiting room, then the live player, then the ended page
// r.embed_url the same, for an <iframe> on your site
// r.ics_url Apple / Outlook calendar file
// r.google_calendar_url Google Calendar
// r.token personal token, e.g. to pass to your own thank-you page
}
| Status | Meaning |
|---|---|
| 201 | New registration. A confirmation mail with the personal link is on its way |
| 202 | {"accepted":true}: the email was already registered (we mail the link again, at most once per 2 minutes and 3 times an hour per email) or the website honeypot was filled. Show "check your inbox". The two cases look the same on purpose, so nobody can fetch someone else's link with only their email |
| 400 | Invalid name or email (error.details.fieldErrors), or a field this endpoint does not know (error.details.unknown_fields, e.g. ["phone"]) |
| 403 | Your page's origin is not in allowed_origins |
| 404 | Unknown webinar, or the key belongs to another account |
| 409 | webinar_ended: registration is closed |
| 429 | More than 5 attempts from one IP for one webinar in 10 minutes, or 3 already-registered emails from one IP for one webinar within an hour (Retry-After) |
Add a hidden website input to your form and send its value: real people leave it empty. An existing registration keeps its original name; only consent can be added later.
Who is registered: the tradeoff
A new registrant gets the personal link in the response (201), so they land straight on their page. A known email cannot get the link (whoever knows an email could read it), so it gets 202. That difference tells a caller whether an email is registered for that webinar. It cannot be hidden without also taking the instant link away from new registrants (every answer would have to be "check your inbox"), so it is limited instead:
- 3 known emails from one IP for one webinar locks that IP out of the webinar for an hour, for every email, so the lock itself does not reveal the next email tried;
- the general limit of 5 attempts per IP per webinar per 10 minutes still applies;
- the 202 body is byte for byte the honeypot answer;
- the confirmation is re-sent to the inbox, never to the caller, at most 3 times an hour per email.
What remains: someone with many IPs can still test a few emails per IP per webinar. They learn only "registered for this webinar or not", never the link, the name or anything else. If that is too much for your audience, register through your own server with the secret API key (POST /v1/) and show your own neutral message.
Sending your own mails
Webinarclose sends a confirmation (with the personal link and an .ics), reminders 24 h and 1 h before, and a "starting now" mail. To send your own instead:
- per webinar:
"emails_enabled": falseonPOST /v1/webinars, or laterPATCH /v1/webinars/{id}with{"emails_enabled": false}(mails already queued are skipped); - per registrant:
"notify": falseonPOST /v1/(secret API key).webinars/ {id}/ registrations
With mails off (for the webinar, or notify: false for that registrant), a known email re-registering on the hosted page or embed.js sees "You're already registered. Use the link from your confirmation or contact the host." The public API answers 202 with {"accepted": true, "email_sent": false, "message": "..."}. The link is never returned: send it yourself (join_url from the API).
Link only by email
A new email gets its personal link in the response (201, or the hosted page redirects to it). That is convenient, but whoever types someone else's email first holds that person's seat link. If that matters, set "link_delivery": "email_only" on POST /v1/webinars or PATCH /v1/webinars/{id}: every public registration (new or known) then answers 202 {"accepted": true} / "check your inbox", and the link only goes out in the confirmation mail. email_only needs mails on (400 otherwise).
Limits
- 5 attempts per IP per webinar per 10 minutes; IPv6 counts per /64.
- At most 5,000 public registrations per webinar per 24 hours (
WC_PUBLIC_REG_DAILY_CAP), then 429daily_cap. Registrations through the secret API do not count. - Request bodies over 64 KB get 413.
- A name that looks like a link or a domain, or is longer than 40 characters, is not used in the mail greeting ("Hi," instead), so the public form cannot be used to put links in our mails.
Prompt for Claude, Cursor or another AI builder
Build me a webinar registration form for my site that posts to Webinarclose.
- API base: https://api.webinarclose.com
- Webinar id: WEBINAR_ID
- Publishable key (public, fine in browser code): wc_pub_...
- First GET {base}/public/v1/webinars/{id} with header "Authorization: Bearer <key>".
Show title, starts_at (format in the visitor's local time zone) and use brand_color with
on_brand_color for the button.
- Form fields: name (required), email (required, type=email), an optional consent checkbox
if page.consent_text is set, and a visually hidden honeypot input named "website"
(tabindex=-1, autocomplete=off, aria-hidden). Real labels, 16px inputs, 48px+ tap targets,
works at 375px width, one clear submit button.
- POST JSON {name, email, consent, website} to {base}/public/v1/webinars/{id}/registrations
with the same Authorization header.
- On 201: show "You're registered", the date, buttons for ics_url and google_calendar_url,
and a link to join_url (the visitor's personal link). Or redirect to my thank-you page
with ?wc_token=<token>.
- On 400 show the field error, on 409 "registration is closed", on 429 "try again in a few
minutes", otherwise a generic retry message. Never block the button forever.
- No framework needed. Do not log or store the email anywhere else.
3. Embedded player
Put the personal link in an iframe on an allowed origin, for example on your thank-you page:
<iframe src="https://api.webinarclose.com/embed/WEBINAR_ID?r=TOKEN"
style="width:100%;aspect-ratio:16/9;border:0" allow="autoplay; fullscreen"
title="Webinar"></iframe>
It shows the same states as the hosted join page. Before the start: the real start time and calendar buttons, refreshing by itself in the last 15 minutes (no countdown). Live: the video starts muted (browser autoplay rules) with a "Tap to unmute" button. Ended: a thank-you with a link back. Viewers never get camera or microphone access (Permissions-Policy), and the page can only be framed by your allowed_origins (Content-Security-Policy: frame-ancestors). Without ?r= it shows a "Register to watch" button that opens the hosted page.
4. Hosted page
Every webinar has a page at https://api.webinarclose.com/w/{slug}. The slug is set on create ("slug": "close-more-deals") or generated from the title, and is unique across Webinarclose. The same page fields can go in "page": {...} on POST /v1/webinars, so one call creates a webinar in Dutch with its own title. Edit the page later with one call (PATCH /v1/webinars/{id}/page); fields merge, null removes one:
curl -s -XPATCH $B/v1/webinars/WEBINAR_ID/page -H "Authorization: Bearer wc_live_..." \
-H 'Content-Type: application/json' -d '{
"logo_url": "https://www.example.com/logo.svg", "website_url": "https://www.example.com",
"brand_color": "#1f6feb", "cover_url": "https://www.example.com/cover.jpg",
"subtitle": "A 45-minute live session for founders.",
"description": "First paragraph.\n\nSecond paragraph.",
"learn": ["Point one", "Point two"], "agenda": ["Intro", "Demo", "Questions"],
"hosts": [{ "name": "Sanne de Vries", "role": "Sales coach", "photo_url": "https://www.example.com/sanne.jpg" }],
"faq": [{ "q": "Is there a replay?", "a": "..." }],
"language": "en", "timezone": "Europe/Amsterdam",
"consent_text": "Send me the occasional tip (optional).",
"thank_you_text": "Bring one deal you are stuck on.",
"redirect_url": "https://www.example.com/thanks"
}'
Every API body is strict: a misspelled or unknown field is a 400 that names it ("Unknown field(s): page.titel", error.details.unknown_fields), never silently ignored.
All text is shown as plain text (escaped), never as HTML. Image and link URLs must be https:// (or a path on the Webinarclose host). The page is server-rendered HTML with inline CSS and one small script; the registration form is the first thing after the title on a phone. After registering, visitors land on a confirmation that says what happens next (calendar, personal link, open it at the start time), or on your redirect_url with ?wc_token=....
Funnel and personalization
Custom fields. page.fields (max 10) adds questions to the hosted form and to embed.js, validated server side and stored on the registration as answers:
"fields": [
{ "key": "company" }, { "key": "phone", "required": true },
{ "key": "team_size", "label": "Team size", "type": "select", "options": ["1-10", "11-50", "50+"], "required": true },
{ "key": "goal", "label": "What do you want to solve?", "type": "textarea" }
]
Types: text, email, tel, select (needs options), checkbox, textarea. company and phone are built in (label and type default, in the page language). The public API and POST /v1/ take "answers": { "team_size": "1-10" }; a bad answer is a 400 with error.details.answers (required, invalid, unknown per key).
Source tracking. The hosted page reads utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref and the referrer, and embed.js reads them from your page's URL. API callers send "utm": { "source": "linkedin" }, "ref", "referrer". Stored on the registration (first touch: a repeat registration never changes it), copied onto every funnel event of that person, and passed on to your redirect_url.
Merge fields. {first_name}, {name}, {company}, any field key, {webinar_title}, {host}, with a fallback after a bar: {first_name|there}. They work in thank_you_title, thank_you_text and in your own mail texts:
"thank_you_title": "Thanks {first_name|there}, your seat is saved",
"mail": { "confirmation": { "subject": "{first_name|Hi}, you're in for {webinar_title}", "intro": "Bring one deal from {company|your team}." } }
Unknown merge fields are refused when you save. Values a registrant typed that look like a link, a domain or markup, or are longer than 40 characters, are left out (the fallback shows), because anyone can register someone else's email. Everything is escaped. The waiting room greets people by first name.
Thank-you next step. After registering people see the calendar buttons and their link, plus:
"ctas": [{ "key": "book", "label": "Book a call", "url": "https://cal.example/you" }]: the first one is a button on the thank-you page (andnext_stepin the public API answer). It goes through/c/, which logs a{webinar_id}/ book?r=TOKEN cta_clickand redirects to the URL you configured. The target never comes from the link itself, so it cannot be abused as an open redirect."share": true: a personal invite link/w/{slug}?ref={ref_code}. Sign-ups through it count as that person's referrals.
Funnel. Page views, registrations, joins, leaves, watch milestones (25/50/75/100 % of the duration), calendar downloads and CTA clicks are funnel_events. GET /v1/webinars/{id}/funnel gives the counts and conversion per step (views -> registered -> joined -> watched half -> clicked CTA), broken down by utm_source and by ref. GET /v1/registrations/{id}/timeline gives one person's journey.
Emails
Every new registration (hosted page, embed.js, public API or POST /v1/) queues these mails in mail_outbox:
Swipe the table sideways
| When | Content | |
|---|---|---|
| Confirmation | right away | personal join link, date and time in the webinar time zone, .ics attached, calendar links |
| Reminder | 24 h before | join link, calendar links, unsubscribe |
| Reminder | 1 h before | join link, unsubscribe |
| Starting now | at the start | join link, unsubscribe |
A reminder whose time has already passed when someone registers is not queued. A reminder that is due while the worker was down is skipped once the next one is due (the 24 h one after start minus 1 h, the 1 h one at the start, "starting now" at the end). Nothing goes out for an ended webinar. Reminders carry List-Unsubscribe (one-click, RFC 8058) and a footer link to /u/{token}: that stops reminders for that webinar; the registration and link keep working. Reply-to is your account's billing email when set. Language follows the page language (en or nl). All mail copy lives in src/mail-templates.ts.
The worker runs inside the API process every 15 seconds and drains what is due. It claims rows with FOR UPDATE SKIP LOCKED plus a 5 minute lease, so ticks and processes never take the same row, and passes a Resend Idempotency-Key. Reminders go through /emails/batch, 100 per request; confirmations carry an attachment, which batch does not allow, so they go one by one. Requests are paced at RESEND_RATE_PER_SEC (default 2; set it to your Resend team limit): the live mail for 1,000 registrants is 10 requests, about 5 seconds. A 429 puts the rows back without spending an attempt and waits Retry-After. Other failures retry after 2, 4, 8 and 16 minutes; after 5 attempts the row is failed with last_error. A retry sends the same payload under the same key (the .ics DTSTAMP is the row's send_at); a 409 invalid_idempotent_request on a retry means an earlier attempt was accepted, so the row is marked sent. Without RESEND_API_KEY (or WC_PUBLIC_URL) mails stay queued and nothing is sent.
Not yet: replays.