Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.formitto.com/llms.txt

Use this file to discover all available pages before exploring further.

@formitto/sdk is the official TypeScript client. It’s generated from the same OpenAPI spec that powers the API reference, so it always matches the live API, and it bundles a webhook signature verifier.

Install

npm install @formitto/sdk

Quickstart

Instantiate the client with your API key, then call the resource namespaces:
import { Formittosdk } from "@formitto/sdk";

const formitto = new Formittosdk({ bearerAuth: "fmt_live_xxxxxxxx" });

// List forms
const { data } = await formitto.forms.listForms({});

// Get one
const form = await formitto.forms.getForm({ id: 123 });

// Create a form
const created = await formitto.forms.createForm({
  name: "Lead form",
  fields: [{ id: "f1", type: "email", label: "Email" }],
  domainId: 5,
});

Ingesting submissions

Pass an idempotencyKey to safely retry without creating duplicates (see Submissions):
const submission = await formitto.submissions.createSubmission({
  id: 123,
  idempotencyKey: "order-4567-submission",
  body: { formData: { Name: "Jane", Email: "[email protected]" } },
});

Verifying webhooks

The SDK bundles a constant-time signature verifier — no extra dependency:
import { webhooks } from "@formitto/sdk";

const ok = webhooks.verifySignature({
  payload: rawBody,
  signatureHeader: req.headers["x-formitto-signature"],
  secret: process.env.FORMITTO_WEBHOOK_SECRET,
});
See Webhooks for the full verification guide.

Resource namespaces

NamespaceMethods
formslistForms, getForm, createForm, updateForm, archiveForm
submissionslistFormSubmissions, getSubmission, createSubmission
calendarslistCalendarWidgets, getCalendarWidget
bookingslistCalendarBookings, getBooking
ecommercelistEcommerceWidgets, getEcommerceWidget
orderslistWidgetOrders, getOrder