No-code capture form
The fastest way to capture contacts: drop a form and one script tag on any page. No API key, no backend — the form posts straight to a source ingest URL, and captured contacts flow through your rules like any other lead.
1. Create a source
In Sources, create a source (e.g. “Website form”) and copy its ingest URL — it looks like https://app.opencontact.dev/ingest/YOUR_SOURCE_TOKEN. The token is the credential; keep it in the URL.
2. Add the form and script
<form data-emailroute>
<input name="email" type="email" placeholder="you@example.com" required>
<input name="first_name" placeholder="First name">
<button type="submit">Subscribe</button>
</form>
<script src="https://app.opencontact.dev/embed.js"
data-emailroute-url="https://app.opencontact.dev/ingest/YOUR_SOURCE_TOKEN"></script>
That’s it. Every input’s name becomes a contact field — email is required; first_name, last_name, phone, company, country, and tags are all recognized. New contacts default to subscribed (a form submit is an opt-in), and an existing unsubscribed contact is never silently re-subscribed.
3. React to the result (optional)
The form emits events you can hook for a thank-you message or redirect:
<script>
document.querySelector('form[data-emailroute]').addEventListener('emailroute:success', function () {
this.insertAdjacentHTML('afterend', '<p>Thanks — you're subscribed!</p>');
});
document.querySelector('form[data-emailroute]').addEventListener('emailroute:error', function () {
alert('Something went wrong. Please try again.');
});
</script>
Options
| Attribute | On | Purpose |
|---|---|---|
data-emailroute-url | <script> | The source ingest URL (required) |
data-emailroute | <form> | Marks a form to wire up (default) |
data-form | <script> | A custom CSS selector, if you don’t want to use data-emailroute |
Multiple forms on a page are all wired automatically.
Prefer server-side?
If you’re capturing on your backend, use the API or the Laravel guide instead — you get idempotency, richer fields, and full control.
Still stuck?
Send us your project ID and what you saw. Contact support.