POST /api/submit— public, CORS-open intake. Accepts URL-encoded, multipart and JSON bodies. Special fields:_site,_form,_page,_redirect(same-site only),_gotcha(honeypot). Passwords, card data, OTPs, CAPTCHA/CSRF tokens and files are never stored. Limited to 20 submissions per client every 10 minutes. Spam (rules insrc/lib/spam.ts) gets a normal success response and nothing is stored; each drop logs anenquiry_spam_droppedevent with the rule that matched. One signal is enough for known bots: the "Robert" + random letters name,*leadgen*sender domains, a link in the name, a token name such asNARTYTRYUT772590NERTHRRTH, ruble payout and Cyrillic link scams, telegra.ph and.buzzlinks, and "earn $50,000,000". Sales templates (lead-gen callback services, SEO and indexing offers, contact-form blasting, product promotions) are dropped when two or more of their phrases appear, because a real enquiry may use one.public/capture.js— copies every<form>submit on a page to the inbox viasendBeaconwithout touching the original form. Skips search forms and anything markeddata-enquiry-ignore./and/setup— the inbox and the connection guide, both locked behind theEDIT_PASSCODEsecret because enquiries contain personal data.GET /api/enquiries,PATCH|DELETE /api/enquiries/:id,GET /api/enquiries/export— session-protected inbox API.GET|POST /api/enquiries/:id/messages— session-protected. Lists the conversation (enquiry_messages, directionoutorin), or emails a reply through theEMAIL(send_email) binding withIn-Reply-To/Referencesset, stores it and marks the enquiry replied. The visitor's original fields are quoted under the reply.PATCH /api/domains/:id(replyFrom,senderName) andPOST /api/domains/:id/test-email— per-domain sender settings, and a test send from the domain's own address toFORWARD_TOwith no fallback.custom-worker.ts— wraps the OpenNext worker and adds theemail()handler (src/lib/inbound.ts) for mail that Email Routing sends to this Worker.
Guides