Skip to content

Getting Started

Formerie receives form submissions, validates submitted values, stores the submission, and delivers through server-managed configuration.

Browser clients submit only field values, human-verification tokens when required, and safe first-party metadata such as page URL or an idempotency key. They never submit recipients, provider credentials, provider names, email templates, delivery rules, or server-side validation rules.

Install The Client

Use the client package when you want helpers for runtime URLs, public schema loading, validation, submission state, and progressive enhancement.

Install @formerie/client
Shell
npm install @formerie/client

Submit A Form

TypeScript
import { FormerieRuntimeClient } from "@formerie/client";

const forms = new FormerieRuntimeClient();

const result = await forms.submit("example.com", "contact", {
  fields: {
    name: "Jane Example",
    email: "jane@example.com",
    message: "Hello"
  },
  verificationToken: captchaToken,
  metadata: {
    pageUrl: window.location.href
  }
});

if (result.ok) {
  console.log(result.submissionId);
}

The default runtime endpoint is https://forms.formerie.com. It uses clean runtime routes such as /example/contact/submit.

Runtime Hostnames

Workspace-bound runtime hostnames keep the form handle in the path:

TypeScript
const forms = new FormerieRuntimeClient({
  endpoint: "https://forms.example.com"
});

await forms.submitWorkspace("contact", {
  fields,
  verificationToken: captchaToken
});

Form-bound hostnames target one form directly:

TypeScript
const contact = new FormerieRuntimeClient({
  endpoint: "https://contact.example.com"
});

await contact.submitForm({
  fields,
  verificationToken: captchaToken
});

Hosted And Embed Paths

Hosted forms, embeds, raw runtime routes, and SDK helpers all use the same public schema, validation, submission, and error contract. Delivery is still configured server-side; client code never sends recipients, templates, provider credentials, or non-public routing rules.