Overview

Introduction

Welcome to the Formix developer documentation. Formix is an AI-powered headless form infrastructure. It allows you to generate backend schemas, databases, and APIs using natural language, and seamlessly integrate them into your own frontend applications.

Why Headless?

Traditional form builders force you to use clunky iframes. With Formix, you retain 100% control over your UI. We handle the heavy lifting:

  • Database provisioning and schema structuring
  • Secure data collection and validation
  • Spam prevention and rate limiting
  • Integration routing (WhatsApp, Slack, Webhooks, etc.)

Authentication

All API requests to Formix must be authenticated using your Secret API Key. You can generate and manage your API keys from the API & Webhooks section of your dashboard.

⚠️

Security Notice: Your API key carries high privileges and grants full access to submit data to your forms. Never expose it in client-side code (like browser-side React components or vanilla JS). Always route submissions through a secure server environment, such as Next.js API Routes or Server Actions.

Pass your API key in the `Authorization` header of all HTTP requests:

HTTP Header
Authorization: Bearer fmx_live_xxxxxxxxxxxxxxxxxxxxxxxx

API Reference

Submitting data to your Formix backend is straightforward. Send a POST request containing a data object to your specific form endpoint.

Submit a response

POSThttps://formix.dev/api/v1/submit/{form_id}

cURL Example

BASH
curl -X POST https://formix.dev/api/v1/submit/frm_abc123 \ -H "Authorization: Bearer fmx_live_your_secret_key" \ -H "Content-Type: application/json" \ -d '{ "data": { "full_name": "John Doe", "email": "john@example.com", "company_size": "50-200" } }'

Next.js Server Action Example (Recommended)

TYPESCRIPT
"use server"; export async function submitToFormix(formData: FormData) { // Construct the payload matching your schema const payload = { data: { full_name: formData.get("fullName"), email: formData.get("email"), } }; try { const response = await fetch(`https://formix.dev/api/v1/submit/${process.env.FORMIX_FORM_ID}`, { method: "POST", headers: { "Authorization": `Bearer ${process.env.FORMIX_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify(payload), }); if (!response.ok) throw new Error("Submission failed"); return await response.json(); } catch (error) { console.error("Formix error:", error); throw new Error("Failed to process form"); } }

Webhooks

Webhooks allow you to receive real-time HTTP notifications whenever a new submission occurs. You can configure Webhook URLs directly in your Formix dashboard.

When an event triggers, Formix will send a POST request to your configured URL with a JSON payload that looks like this:

JSON PAYLOAD
{ "event": "form.submitted", "formId": "frm_abc123", "formName": "Startup Waitlist", "submissionId": "sub_xyz987", "source": "api", "timestamp": "2026-04-27T09:35:53.000Z", "data": { "full_name": "Jane Smith", "email": "jane@example.com" } }

WhatsApp FlowsPRO

With the Pro plan, you can convert any headless form into an automated WhatsApp conversational bot. Formix uses the official Meta Cloud API to orchestrate this directly from your JSON schema.

Configuration Steps:

  1. Navigate to your Meta Developer Dashboard and create a WhatsApp Business App.
  2. Generate a Permanent Access Token.
  3. In your Formix Dashboard, go to WhatsApp Flows and click Configure API.
  4. Paste your Phone Number ID and Access Token into Formix.
  5. Formix will instantly generate a Webhook URL and Verify Token. Paste these back into your Meta dashboard configuration to finalize the connection.

Once connected, simply turn on a Flow for any active form. Users can initiate the form by messaging your business number with the keyword START [form_id] or via a generated wa.me sharing link provided in your dashboard.