FormBox.ai docs

Secure form intake for modern websites.

FormBox gives websites secure Hooks, ordered Inbox submissions, notification routing, private files, AI review, approved webhooks, reports, and API/MCP operations. Your website keeps ownership of the visible form.

Product boundary

FormBox handles submission intake, storage, review, routing, and delivery. The website controls its visible fields and validation.

Quickstart

Connect a website

  1. Step 1

    Create a Site using the website's canonical domain.

  2. Step 2

    Create a Hook for the form or workflow.

  3. Step 3

    Configure notification routing, allowed origins, and optional approved-webhook delivery.

  4. Step 4

    Build the visible form in the website or install a maintained adapter.

  5. Step 5

    Submit the browser form to a same-origin site handler.

  6. Step 6

    Validate the request and verify Turnstile or captcha before forwarding.

  7. Step 7

    Forward the request to the Hook with the intake secret on the trusted server.

  8. Step 8

    Run a safe test and verify Inbox, Activity, files, and expected delivery behavior.

Hook intake URL

Every Hook receives a URL in the form https://hooks.formbox.ai/f/{hookId}/{slug}. Treat the paired intake secret as a server-side credential.

Model

Core concepts

Site

A website/domain in FormBox. Sites own Hooks, timezone overrides, and scoped dashboard views.

Hook

A secure intake URL for one form or workflow. Hooks store notification routing, allowed origins, status, approved-webhook settings, and an intake secret.

Inbox

The operational queue of submissions. Each item keeps readable fields, raw payload JSON, metadata, files, delivery activity, and AI review state.

Reports

Filtered submission totals, charts by day/site/Hook, failed-delivery counts, and CSV export.

Settings

Workspace defaults for timezone, email templates, internal copies, operational alerts, AI review, users, API keys, and delivery ops.

API / MCP

REST/OpenAPI is the machine-readable source of truth. The local MCP server maps agent workflows to the same API.

Integration

The production request flow

Browser form

Collect visible fields and attribution. Never receive or expose the Hook secret.

Same-origin site handler

Validate required fields, normalize values, and verify Turnstile or captcha.

FormBox Hook

Authenticate intake, store the Inbox item and files, then start review and delivery work.

Keep credentials behind the website

Secured Hooks require X-FormBox-Secret. Send it only from a trusted server, serverless function, or terminal. Never place the intake secret in browser HTML, browser JavaScript, a hidden field, a public repository, or analytics data.

Fail closed before FormBox

When the website uses Turnstile or another bot check, a missing or invalid token must stop at the same-origin handler. Do not downgrade to a direct public browser post to make a preview work.

Quick check

One server-side request

Use this request to verify Hook connectivity from a trusted terminal or server.

Server or terminal cURL
# Run from a trusted server or terminal only.
curl "$FORMBOX_HOOK_URL" \
  -H "Content-Type: application/json" \
  -H "X-FormBox-Secret: $FORMBOX_HOOK_SECRET" \
  --data '{
    "payload": {
      "name": "Test Lead",
      "email": "test@example.com",
      "message": "Testing FormBox intake"
    }
  }'

This creates a real Inbox item

Use a non-client test Hook or approved test recipients. A successful request is stored and can start configured notification, AI-review, and delivery workflows.

Data contract

Payload, metadata, and display order

Payload

Visitor-submitted business fields. FormBox preserves these values and shows them in client-facing field tables.

Metadata

Page, referrer, user-agent, UTM, click-ID, source, and system context. Keep it out of visible business fields.

Field order

Send metadata.fieldOrder for JSON or _formbox_field_order for multipart requests.

  • The website owns field names, labels, validation, normalization, conditional logic, and required-state behavior.
  • Use lowercase snake_case keys for business fields and keep the order hint aligned with the visible form.
  • FormBox applies field order to notification emails, dashboard Submitted fields, API payloadFields, and CSV exports.
  • Capture first-touch attribution before the visitor reaches the form and forward it as metadata, not payload.
  • Supported reserved metadata fields use the _formbox_ prefix; never use that prefix for normal business fields.

Files

Private upload paths

Multipart intakeUp to 5 files, 10MB eachJPG, JPEG, PNG, WEBP, HEIC, HEIF, PDF, DOC, DOCX, and TXT.
Direct PDF uploadOne PDF, up to 20MBAuthorize through the Hook upload endpoint, validate the returned versioned policy, upload to private R2, then submit the one-time claim ID.
StoragePrivate objectsFormBox stores file metadata in the database and file bytes in private object storage.
DownloadsProtected deliveryDashboard downloads require organization access; email links use signed FormBox routes and private-storage redirects.

Use the Hook descriptor as the contract

Hook API responses expose a public directUpload descriptor only when the secret, exact allowed origin, and storage configuration are ready. Integrations must validate its version, limits, content type, organization, Hook, and storage host before sending bytes.

Routing

Notifications, AI review, and retries

Notification routing

  • Hook notification emails are the primary recipients for that workflow.
  • Hook CC recipients are configured separately.
  • Global BCC copies are separate internal emails, not literal SMTP BCC recipients.
  • A Hook may intentionally use only Global BCC routing when no primary or CC recipient is configured.
  • Client-facing notifications stay clean; source metadata appears only on internal copies when enabled.

AI review

  • Label-only mode stores and routes normally, then labels the Inbox item.
  • Block-spam mode stores every submission and suppresses email for high-confidence spam at or above the configured threshold.
  • Classifier failures or uncertain results fail open for normal lead email so legitimate leads are not silently lost.
  • Approved webhooks remain fail closed and require a confirmed legitimate verdict.

Store first, deliver second

FormBox commits the Inbox item before external delivery. Inngest handles immediate durable delivery work; bounded hourly reconciliation re-emits pending or stuck work and provides a controlled fallback. Activity records every attempt and retry state.

Operational failure alerts

Delivery failures can alert a configured operational address. When no valid override exists, FormBox falls back to the current organization owner account email.

Outbound

Approved-submission webhooks

An approved webhook is an optional outbound delivery for systems that should receive only AI-confirmed legitimate submissions. It is separate from client notification email.

  • Configure a public HTTPS receiver and a dedicated signing secret together.
  • The signing secret is write-only, encrypted at rest, and must not reuse the public intake secret.
  • Private hosts, local addresses, and raw IP targets are rejected.
  • FormBox withholds the webhook for spam, suspicious, uncertain, pending, failed, or unavailable AI review states.
  • Webhook attempts use durable delivery records, retry behavior, and visible submission Activity.

Automation

Atomic Site and Hook provisioning

POST /api/v1/provision-site-intake creates one Site and between 1 and 50 Hooks in one authenticated workflow for a website integration.

RequestCanonical domain, optional Site name, and 1–50 Hook definitionsEach Hook can include notification routing, allowed origins, and a paired approved-webhook URL and signing secret.
ValidationStrict and fail closedOnly documented properties are accepted. Duplicate generated Hook slugs and malformed domains, emails, origins, or webhooks are rejected before writes.
Limits256 KiB body and 10-second read deadlineOversized and stalled requests return dedicated 413 and 408 errors.
AtomicityAll or nothingIf any Site or Hook write fails, no usable partial installation is returned.
ResponseSite plus created HooksEach Hook includes its intake URL, one-time intake secret, and directUpload descriptor when available.

Dashboard

Dashboard reference

InboxSearch and filter submissions by date, Site, Hook, delivery status, files, and payload text. Detail pages show submitted fields, raw JSON, metadata, files, Activity, AI review, and owner-only permanent delete.
SitesCreate Sites by domain, set a Site timezone, create connected Hooks, and review recent submissions for that Site.
HooksCopy the live Hook URL, explicitly reveal its intake secret as a manager or owner, send a test Inbox item, pause or reactivate intake, configure notification and CC emails, allowed origins, and an optional approved-submission webhook.
ReportsRun reports across all time, presets, custom ranges, Sites, and Hooks. Export CSV with ordered payload fields.
Settings / GeneralSet the account timezone used when a Site does not have its own timezone override.
Settings / EmailConfigure Global BCC copy recipients, operational failure alerts, metadata visibility, table or plain-text format, subject and sender templates, and reference numbers.
Settings / AI ReviewEnable spam review, choose label-only or block-high-confidence-spam behavior, and set the confidence threshold.
Settings / UsersOwner-only user creation, role changes, and non-owner user removal. Roles are owner, manager, and viewer.
Settings / APIOwner-only API key creation, one-time reveal/copy, revoke/reinstate, and delete. Presets include Agent — Read/Write, Agent — Read Only, and Admin.
Settings / OpsReview pending, failed, or stuck delivery work and retry recoverable failures.
AccountUpdate the user profile name, agency workspace name, and view the current role and preferences.

Roles

Owner manages everything, including users, API keys, and permanent deletes. Manager can manage normal records such as Sites and Hooks. Viewer is read-only.

Automation

Management API, OpenAPI, and MCP

Use FormBox API keys for agents and automation. Send the key as a bearer token and grant only the scopes the workflow needs.

SitesGET/POST /api/v1/sitesGET/PATCH/DELETE /api/v1/sites/{siteId}
HooksGET/POST /api/v1/hooksGeneric reads exclude intake secrets. GET /api/v1/hooks/{hookId}/secret requires hooks:secrets:read; PATCH/DELETE and secret rotation remain separate privileged operations.
InboxGET /api/v1/inboxGET /api/v1/inbox/{inboxItemId}; file, download, delivery, and retry routes
SettingsGET/PUT /api/v1/settings/emailAPI key, user, and delivery-ops routes under /api/v1/settings and /api/v1/ops
ProvisioningPOST /api/v1/provision-site-intakeAtomically creates one Site plus one or more Hooks.
OpenAPIGET /api/v1/openapi.jsonAuthoritative machine-readable request, response, validation, and error contract.

API key presets

Agent — Read/Writesites:*, hooks:*, inbox:*, settings:*, api_keys:*, users:*, ops:*, provision:write
Agent — Read Onlysites:read, hooks:read, inbox:read, settings:read, api_keys:read, users:read, ops:read
Admin*

MCP tools

The local stdio MCP wrapper exposes these workflow tools and maps them directly to REST:

list_sitescreate_siteget_siteupdate_sitearchive_sitelist_hookscreate_hookget_hookreveal_hook_secretupdate_hookarchive_hookrotate_hook_secretlist_inboxget_inbox_itemlist_inbox_filesget_inbox_file_download_urllist_inbox_deliveriesretry_inbox_deliveryget_email_settingsupdate_email_settingslist_api_keyscreate_api_keyrevoke_api_keydelete_api_keylist_userscreate_userupdate_user_roleremove_userlist_ops_deliveriesprovision_site_intake
View the authoritative OpenAPI specification

Verification

Safe release checks

Fail-closed checks

  • A missing or wrong Hook secret returns 403 before storage.
  • A disallowed Origin returns 403 when origin restrictions are configured.
  • Missing or invalid website captcha fails before the same-origin handler forwards.
  • Honeypot and too-fast submissions fail before storage.
  • Paused Hooks return 409 and rate-limited traffic returns 429 with Retry-After.

Successful-path checks

  • Use a non-client test Hook or explicitly approved test recipients.
  • Confirm the Inbox item contains the expected ordered business fields and separate metadata.
  • Confirm files appear under the expected fields and signed downloads work.
  • Confirm Activity records the expected notification, AI, webhook, retry, or blocked state.
  • Run a landing-page navigation test to prove first-touch attribution survives before form submit.
  • Do not submit a real client lead unless explicitly approved.

Help

Troubleshooting

403 invalid_secretThe Hook secret is missing or wrong.Send X-FormBox-Secret only from a trusted server-side integration. Browser forms should submit to a same-origin site handler.
403 origin_not_allowedThe request Origin is not in the Hook allowed-origins list.Add the exact production or approved preview origin, or intentionally leave the list empty for normal intake.
400 too_fast or honeypot errorsThe bot-trap values look suspicious.Keep _formbox_hp empty and set _formbox_started_at when the visible form loads.
409 hook_pausedThe Hook is paused.Reactivate the Hook in the dashboard or PATCH the Hook status through the API.
429 rate_limit_exceededToo many submissions reached the same Hook/IP window.Honor Retry-After and reduce automated test traffic.
Fields appear in the wrong orderNo valid field-order hint was sent.Send metadata.fieldOrder for JSON or _formbox_field_order for multipart, matching visible business-field order.
Metadata appears as visible fieldsTracking values were sent in payload.Move page URL, referrer, user agent, UTMs, and click IDs into metadata or supported reserved _formbox_* fields.
Attribution is missing after navigationThe website captured attribution only on the form page.Capture first-touch attribution before navigation, then forward it as metadata when the visitor submits.
Submission stores but no email arrivesNo recipient is configured, AI blocked delivery, or delivery failed.Check Hook routing, AI Review, submission Activity, and Settings / Ops.
Approved webhook did not fireThe submission was not confirmed legitimate or webhook delivery failed.Check AI verdict and Activity. Approved webhooks are deliberately withheld unless AI confirms a legitimate lead.
File upload rejectedThe request exceeded the selected upload path's count, size, type, origin, or storage requirements.Check the multipart limits or the Hook's directUpload descriptor and policy.

Start with the Inbox item

Submission detail is the source of truth for what FormBox received: ordered fields, raw payload JSON, metadata, private files, delivery Activity, and AI review state.