Getting started

How 1DB works

1DB is one database and one endpoint for every website you run. Each site’s forms send their submissions to 1DB, which checks them, stores them with the campaign that brought the visitor, links them to a contact and company, and sends them on to the people and tools that act on them.

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.
  1. Step 1

    Your sites

    Any framework, any host. Each site has its own key and forms.

  2. Step 2

    One endpoint

    Every form posts to POST /v1/leads, or uses the hosted form script.

  3. Step 3

    Checked and stored

    Fields checked, repeats dropped, campaign kept, contact and company linked.

  4. 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:

What happens to a lead

From the visitor pressing send to your team seeing it, every lead takes the same path.

  1. The site posts it. A server route, the page itself or the hosted form sends the fields to POST /v1/leads with the website’s key and the form’s formSlug.
  2. 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.
  3. 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 a 400 naming the field, with a message to show the visitor, including “Did you mean jo@gmail.com?” for a typo.
  4. Repeats are dropped. A double click or a retry that carries the same submission_id is stored once and sends nothing twice.
  5. The lead is stored. With the page it came from, UTM tags, ad click IDs, the referrer and the visitor’s IP and browser.
  6. 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.
  7. 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.

Next