Getting started
How 1DB works
What 1DB is
Most forms end in an inbox, a spreadsheet or one CRM, set up again for every site. That works for one site. With five it becomes five setups, and with a few hundred nobody knows which forms still work. 1DB replaces those setups with one place:
- Capture. Every site sends leads to the same endpoint, from its own code, a hosted form or a coding agent.
- Keep. Every lead is stored once, checked, with its campaign, and joined to the contact and company it belongs to, across all your sites.
- Send on. Each lead goes where you send it: an email to your team, a webhook or a partner’s API.
- Watch. Each site shows its domain, hosting, DNS, repository and traffic next to its leads, so a site that stopped working stands out.
Step 1
Your sites
Any framework, any host. Each site has its own key and forms.
Step 2
One endpoint
Every form posts to POST /v1/leads, or uses the hosted form script.
Step 3
Checked and stored
Fields checked, repeats dropped, campaign kept, contact and company linked.
Step 4
Sent on
Email alerts and webhooks per form, partner APIs for the organization.
The pieces
Everything in 1DB belongs to an organization, and nothing is shared between organizations. Inside one, the pieces nest like this:
- Organization
- Your team’s account. Members, connections (GitHub, Vercel, Cloudflare, PostHog), forwarding rules and agent tokens belong to it.
- Website
- One site you collect leads from, usually one domain. It has an ingest key (
1db_…) that can only send leads, its forms, and what 1DB knows about its domain, hosting, repository and traffic. - Form
- The fields one form on that site collects, with a slug that is unique across 1DB, like
acme-contact. Alerts, webhook and defaults are set per form. Every new website starts with a contact form. - Lead
- One submission: the fields as the visitor sent them, plus the page, campaign, visitor IP and browser, and where it has been sent.
- Contact
- The person behind leads, matched by email. A visitor who fills in forms on three of your sites is one contact with three leads.
- Company
- Contacts grouped by their email domain. Addresses at Gmail, Outlook and other free providers aren’t grouped into a company.
- Destination
- Where a lead goes after it’s stored: email alerts or a webhook (set on the form), or a forwarding rule to an API (set for the organization).
What happens to a lead
From the visitor pressing send to your team seeing it, every lead takes the same path.
- The site posts it. A server route, the page itself or the hosted form sends the fields to
POST /v1/leadswith the website’s key and the form’sformSlug. - 1DB checks who sent it. The key must belong to the website that owns the form. Requests are rate-limited per visitor, so one noisy visitor can’t crowd out the rest.
- The fields are checked. Email addresses that can’t receive mail, throwaway addresses and made-up phone numbers are refused. With
X-1DB-Contract: 2, every problem comes back as a400naming the field, with a message to show the visitor, including “Did you mean jo@gmail.com?” for a typo. - Repeats are dropped. A double click or a retry that carries the same
submission_idis stored once and sends nothing twice. - The lead is stored. With the page it came from, UTM tags, ad click IDs, the referrer and the visitor’s IP and browser.
- It’s linked and sent on. 1DB links it to its contact and company, then runs each of the form’s destinations. Each runs on its own: a webhook error doesn’t stop the email, and none of them can lose the lead, which is already stored.
- Your team works it. The lead is in the dashboard’s Leads list, on its contact, and readable by agents through the API.
Use 1DB’s field names
Send email, phone, first_name, last_name, company and message under those names and they fill the contact and alerts on their own. Any other field is stored exactly as sent. The full list is in Forms.
Watching your sites
Leads are half the picture. When you add a website, 1DB reads its homepage and domain records: who registered the domain and when it expires, whose servers run its DNS and email, and whether anything is live there yet. Connect your accounts and each site also shows:
- the repository behind it, from GitHub
- the project that deploys it and its latest deploy, from Vercel or Cloudflare
- its pageviews and visitors next to its leads, from PostHog
1DB also checks each site’s lead path and says what’s wrong in plain words: the site is down, it has no form or no active key, its leads have stopped for far longer than its usual rate, the live site still sends a key that was revoked, or its forwards are failing. Across hundreds of sites, those are the ones that rise to the top.
Two kinds of key
A website’s ingest key (1db_…) can only send leads to that website. It’s safe in a page, and the worst anyone can do with it is send junk. An agent token (1db_at_…) lets the CLI or a coding agent manage your websites, forms and leads, limited to the scopes you approve. Only a person can create one, and it never goes into a project. Details in Authentication.