# Doorman
> Doorman reads every submission to a website's forms and lets real customers through while sales pitches, SEO spam and bots stay out: contact, demo request and quote forms first. It stops sales pitches, SEO spam and bots, forwards only the real submissions, so the owner never has to think about spam; every drop keeps a plain-language reason (the sentence or field that gave it away), rescuable in one click. No captcha: real visitors never see anything. Each submission is judged in about 100 ms, inline, before the thank-you page loads.
This file is for coding agents (Claude Code, Codex, Cursor, etc.) setting Doorman up for a user. Everything below can be done without a browser.
Base URL: https://withdoorman.com
Human docs: https://withdoorman.com/docs
MCP server: https://withdoorman.com/mcp (Streamable HTTP)
## The four rules that matter most
1. Act on `action` (or the boolean `deliver`), never on `route`. `route` is Doorman's opinion; `action` is what you should do. They differ in watch mode: route "drop", action "deliver". Code that drops on route silently throws away every lead watch mode was meant to keep.
2. Start a new lead form (contact, demo, quote) in watch mode, and switch to enforce after a week or two of verdicts look right. On a low-traffic form one wrongly dropped lead costs more than a year of spam.
3. The user must click the confirmation link Doorman emails them. Until they do, the account has 100 checks and emails nothing (Slack and webhooks work); once they confirm, the last two weeks of real submissions are emailed to them. Don't report "done" until GET https://withdoorman.com/v1/account says "verified": true, or you've told them plainly.
4. A backend check needs a timeout (3-5 s) and a fallback that still delivers the lead if Doorman is slow or down.
## Setup steps (plain HTTP, the fastest path in-session)
1. Find the project's forms. Look for
Keep existing field names. Doorman detects email (email, e-mail, your_email), name (name, full_name, first_name) and message (message, comments, body, details, inquiry, question, notes, description) by name; anything else is kept as an extra field. Add data-doorman-ajax to the form to submit without a page reload. A hidden _next field (same site only) or the form's redirect_url sets where the visitor lands; default is https://withdoorman.com/thanks. Watch mode and forwarding are handled for you.
c) React / SPA with no backend: POST FormData (or JSON) from the client to the action URL with Accept: application/json. The response is always {"ok": true} whatever the verdict. Get a component: GET https://withdoorman.com/v1/forms/f_.../snippet?platform=react
Checkout / orders: kind "checkout" with { "order": { "items": "...", "total_usd": 120 }, "signals": { "card_country", "ip_country", "attempts", "device_orders_last_hour", "account_age_days", "name_match", "card_type", "shipping" } }.
4. Destinations (where real submissions go) for hosted forms and checks with forward: true. Every form forwards to the account's email by default (pass email_to: "" to turn that off). Add Slack or a webhook if the user wants:
PATCH https://withdoorman.com/v1/forms/f_...
{ "slack_url": "https://hooks.slack.com/services/...", "webhook_url": "https://...", "email_to": "a@x.com, b@x.com" }
Email forwarding only goes to confirmed addresses: the account's own email once confirmed, and any other address after its owner clicks a confirmation email Doorman sends them. Webhook and Slack URLs must be public (private and internal addresses are refused).
Webhooks are signed: header Doorman-Signature: t=,v1=.")>. webhook_secret appears on the form object once a webhook_url is set. Failed deliveries are retried after 1m, 5m, 30m, 2h, 12h.
Check they work: POST https://withdoorman.com/v1/forms/f_.../test-delivery
5. Verify, read state back, and tell the user. Test submissions are free (up to 100 a day) and not forwarded:
POST https://withdoorman.com/v1/forms/f_.../test { "message": "Hi, we run a 12-person dental clinic and spend a day a week chasing invoices. Can we see a demo?" } -> action deliver
POST https://withdoorman.com/v1/forms/f_.../test { "message": "We help SaaS founders fill their pipeline with done-for-you outreach. 15 min chat?" } -> route drop (action deliver in watch mode)
GET https://withdoorman.com/v1/forms/f_... -> the form's mode, destinations and settings as saved
GET https://withdoorman.com/v1/account -> "verified", plan and this month's usage
Tell the user: which integration you used, where submissions go, that the form is in watch mode (and to switch to enforce when the verdicts look right), that drops are visible and rescuable at https://withdoorman.com/app, and, if "verified" is false, to click the confirmation link in their email or nothing gets emailed to them.
## MCP (optional)
The MCP server has the same operations as tools (doorman_signup, doorman_whoami, doorman_get_install_snippet, doorman_update_form, doorman_test_submission, ...). A newly added MCP server usually only loads in the agent's next session or after a reconnect, so do the setup itself over plain HTTP above, and add MCP for later use.
With an existing key (recommended):
claude mcp add --transport http doorman https://withdoorman.com/mcp --header "Authorization: Bearer $DOORMAN_KEY"
Codex: add to ~/.codex/config.toml: [mcp_servers.doorman] url = "https://withdoorman.com/mcp" with the header Authorization = "Bearer ".
Without a key, only doorman_signup and doorman_docs work. If the user already has an account, don't sign up again: ask for a key and pass it as api_key to each tool, or reconnect with the header.
## Options worth knowing
- mode: "watch" delivers everything and tags would-be drops (route "drop", action "deliver"). Recommended for new lead forms; switch to "enforce" with PATCH {"mode": "enforce"} after a week or two. Default is enforce.
- deliver_at (default 0.8) and drop_below (default 0.2) are the P(real) thresholds. Between them is "hold": forwarded flagged as held (forward_holds, default true) and queued for review.
- allow_list / block_list: emails or domains (acme.com, *.acme.com) always delivered / always dropped, without a check.
- kind: lead (contact/demo/quote/sales, default; pitches, spam, bots), signup (fake and throwaway accounts), checkout (card testing, stolen cards), comment (promotion, link spam, harassment, hate, threats). One form per distinct form on the site: POST https://withdoorman.com/v1/forms { "name": "Demo request", "kind": "lead", "mode": "watch", "site_context": "..." }
- Nothing is silently dropped: over the monthly quota or when judging fails, submissions are held and forwarded unjudged, flagged as held. A flood from one IP (over 30 posts a minute to one form) is stored as held in the dashboard, not forwarded.
## If something doesn't work
Don't guess at a workaround. Send the problem to Doorman's founder, who reads every request:
POST https://withdoorman.com/v1/support { "message": "what you were trying to do and what happened", "error": "the exact error text", "category": "setup|bug|billing|question|other", "agent": "your agent's name" }
or the MCP tool doorman_contact_support. The account's context (plan, forms, recent errors, never keys) is attached, and the reply goes to the account email. Tell the user you've done it. Without an account yet: https://withdoorman.com/support.
## API reference (all need Authorization: Bearer dm_live_... except signup)
- POST /v1/signup { email, site_url, site_context, form_name?, mode?, agent? } creates the account, its first form and a key
- GET /v1/account (alias /v1/me) email, verified, plan, usage
- GET /v1/forms
- POST /v1/forms { name, kind?, mode?, site_context?, email_to?, slack_url?, webhook_url?, ... }
- GET /v1/forms/{id}
- PATCH /v1/forms/{id} { any form setting }
- DELETE /v1/forms/{id}
- GET /v1/forms/{id}/snippet?platform=html|ajax|react|fetch|nextjs|express|curl|python|ruby|elixir|webflow|framer|wordpress
- POST /v1/forms/{id}/test { message, email? }
- POST /v1/forms/{id}/test-delivery
- POST /v1/check { form? | kind? + context?, email, name, message, fields?, signals?, order?, forward? }
- GET /v1/submissions?form=&route=&review=true&before=&limit=
- GET /v1/submissions/{id}
- POST /v1/submissions/{id}/label { label: "real"|"spam" }
- POST /v1/support { message, error?, category?, agent? }
Errors are JSON { "error": "human-readable message" } with 4xx/5xx status. 429 means slow down.
## Pricing
Every new account starts with a 14-day Pro trial, no card (30 days from a referral link); then Free unless upgraded.
Free: 1 form, 100 submissions/month, 100 email forwards (Slack and webhooks unlimited). Pro: $29/month or $290/year, 10 forms, 5,000 submissions, 2,000 email forwards. Business: $79/month or $790/year, 50 forms, 50,000 submissions, 10,000 email forwards. Pitches and bots count as submissions; over the limit nothing is dropped (held and forwarded unjudged). Limited offer until November 30, 2026 for the first 100 paying customers: Pro $19/month, Business $59/month, kept while subscribed. Test submissions are free. Details: /pricing