Skip to content
Browse documentation

Getting Started

Website integration

Connect your website to inFlow, by hand or with a coding agent. Prepare drafts, publish after review, and verify the saved submissions.

Open Markdown

inFlow handles form submissions and stores them in your CRM. You can embed the form widget or build your own interface against the Submissions API. A temporary integration key helps you or your coding agent prepare the setup and test it. The website itself uses a public key.

Choose how to integrate

By hand: follow this guide and use the Integration API reference for setup calls. With Claude or Codex: create the same key, save it locally, and paste the prompt below in your website repository. Both paths use the same API and documentation.

Start in Settings

  1. 1Open Settings → Connect your coding agent. You do not need to create a form first.
  2. 2Select one business, or several businesses used by the same repository. Choose form access separately for each. The default permits creating forms and editing only forms this key creates.
  3. 3Enter the exact production, preview, and localhost hosts the agent may register. Domain registration requires settings edit permission. Leave blank to register domains yourself.
  4. 4Create a key, save the one-time secret in a gitignored .inflow.env at your website repository root, and copy the agent prompt. Default expiry is 24 hours; maximum 72.
  5. 5Your agent discovers the businesses, prepares form drafts, registers the approved domains, and wires the website. To install the toolkit and analytics script itself, see Embedding scripts. With an ik_ integration key and form access, the agent can publish a form itself. Legacy fa_ authoring keys cannot publish, delete forms, or read leads. Edits that could hide or break past answers wait for your approval.
  6. 6Let the agent test from your website and read back its exact submission. Test leads are real CRM records and may trigger normal notifications. Use synthetic data and review the reported lead IDs.
text
Add a lead capture form to my website using inFlow. Start by reading https://inflow.build/agents.txt

Local credential

sh
# .inflow.env — add this filename to .gitignore before saving
INFLOW_API_BASE="https://api.inflow.build"
INFLOW_INTEGRATION_KEY="ik_paste_secret_here"

# Discover permitted businesses without selecting one yet
source .inflow.env
curl -sS "$INFLOW_API_BASE/api/agent-integration/businesses" \
  -H "Authorization: Bearer $INFLOW_INTEGRATION_KEY"
The ik_ key stays on the developer's machine. Never commit it, put it in a URL, deploy it, print it in chat, or expose it as NEXT_PUBLIC_ / VITE_ configuration. Use a separate .inflow.env to avoid framework env loading. A normal server-only .env variable is not automatically public, but keeping the integration credential separate makes accidental deployment easier to avoid. Only pk_ public keys belong in the website.

Two businesses, one repository

A coding portfolio and photography portfolio can share one integration key with two grants. Discovery returns each business ID, name, slug, and public key. Confirm the website-to-business mapping with the owner, then send X-Business-Id on every operation. Keep each app's public key and form IDs separate. The API never defaults a multi-business request to the first business, and adding another business to the account does not expand an existing key.

API contract

Base: https://api.inflow.build/api/agent-integration. Send Authorization: Bearer $INFLOW_INTEGRATION_KEY and X-Business-Id: BUSINESS_ID, except discovery which needs only Authorization. The issuer's current membership, permissions, and billing still apply. A key can create, edit and publish forms. Deleting a form always waits for the person's approval (202 waiting_for_approval, send X-Agent-Reason) and moves it to Trash, where it can be restored. An edit that removes or retypes a field with submissions, or changes where answers go, waits for the person's approval.

Method and pathPurpose
GET /businessesDiscover explicitly granted businesses
GET /catalogFetch canonical portable-form JSON Schema, field variants, renderer limitations, and endpoint names
POST /validate-definitionValidate a portable form document without saving
GET /formsList permitted forms
POST /formsCreate an unpublished draft (created or all-form scope)
GET /forms/:idRead the effective draft and revision
PUT /forms/:idSave with expectedRevision; re-read and reapply on 409
POST /forms/:id/publishPublish the draft now. Recorded in key activity with undo; no approval needed
POST /environmentsRegister only domains approved when the key was issued; does not alter existing environments
GET /forms/:id/status?origin=...Check publication, origin registration, and submission counts
GET /forms/:id/submissions/:leadIdRead back one exact submission with X-Inflow-Continuation-Token; broader reads require explicit readLeads permission
GET /forms/:id/submissions?limit=20&before=LEAD_IDPaginated reads of permitted form leads; requires explicit readLeads permission, maximum 50 per page

Verify saved data

Submit from the real website using POST /api/leads, its business pk_ key, published formId, and submissionVersion: 2. Retain the returned leadId and continuationToken locally. Call the readback endpoint with the ik_ key, correct X-Business-Id, and X-Inflow-Continuation-Token. Compare contact.name/email/phone, responses, fields, notes, hiddenFields, source, and selectedPhotos with the test input. The proof expires after 24 hours; the integration key can expire sooner. A count increase alone is not proof of correct mapping.

For an art print inquiry, send artwork context in selectedPhotos with category: artwork and its photoId, url, thumbUrl, and altDescription. Preserve stable step, option, and nested field IDs and set explicit answer mappings. Exercise required fields, conditions, error recovery, duplicate-submit prevention, numeric zero, boolean false, and unregistered-origin rejection. Register localhost explicitly for tests against production.

Read other leads is off by default. Enabling it permits exact-ID and paginated reads within the key's allowed forms and selected business, including real customer details. Treat this as access to customer data. It does not permit deleting or updating leads. Revoking the key stops access across all its businesses immediately.

Renderer limitations

Schema validation does not guarantee that every component works in the widget. Inspect the catalog and avoid these current gaps:

ComponentCurrent behavior
File uploadThe widget has no branch for it and renders "Unsupported step type."
Address and ranking inside a composite stepThey fall back to a plain text box and store the wrong answer shape.
Appointment or calendar inside a composite stepPlain date input only, with no availability logic. A top-level calendar step works once the business has configured availability.

Next steps

Use the Integration API reference for requests, responses, scopes, errors, and rate limits. Read Submissions API for browser submission fields and continuation. This guide is also available as Markdown, generated from the same content. Legacy fa_ keys remain draft-only and business-specific; their legacy reference is retained for existing integrations.