Forminal

The Form JSON Schema

A whole form, with its fields, settings and look, can be written as one JSON document. The form JSON schema describes that document, so code and AI agents can write a form, check it and import it. By the end of this guide you’ll have checked a form document against the schema and turned it into a draft in your account.

Read the schema

The schema is published at /api/forms/schema on the app’s address. It needs no account or key, it follows JSON Schema draft 2020-12, and it’s generated from the same rules the app checks forms with, so it always matches what the app accepts.

  1. Open the schema in your browser, or fetch it from a script.
  2. Point your editor or validator at the schema’s address to get autocomplete and error checks while you write a form file.

A document has two parts: forminal, the format version, and form, the form itself. The current version is 4, and versions 1 to 3 still import. A file exported before the product was renamed names its version awesomeforms, and it imports too.

{
  "forminal": 4,
  "form": {
    "id": "replaced-on-import",
    "title": "Contact us",
    "settings": { "submitButtonText": "Send" },
    "fields": [
      { "id": "a", "type": "email", "label": "Email", "required": true }
    ]
  }
}
  • form.id, title, fields and settings are required. description and style are optional.
  • Every field needs an id, a type, a label and required. The type is one of the 25 field types, from short_text and email to payment, content and page_break.
  • settings holds the submit button text, the confirmation, notifications, branding and the page progress options.
  • style holds the theme, the Appearance (mode: auto, light or dark), font, colors, layout, inputs, buttons, the logo and cover (header), the card (card) and custom CSS. Send only the parts you want to change and the theme fills in the rest.

Build a form from JSON

  1. Write the document, or ask an agent to write it.
  2. Send it to POST /api/forms/import with an API key and the Forminal-Ack header, which carries the acknowledgement code from llms.txt. The app gives the form and every field new ids and creates a draft in your account.
  3. Read the answer. It holds the new form with its id, a dropped list of anything it couldn’t carry over, and warnings naming features your plan doesn’t include.
  4. Open the draft in the builder, check it, and publish it when you’re ready.

To get an existing form in the same format, use GET /api/forms/FORM_ID/export. The result imports unchanged, which makes it a simple way to copy a form, keep a backup, or keep form files in version control. See Use the REST API for sending requests.

Good to know

  • A few rules can’t be written in JSON Schema, so a document can pass the schema and still be refused: a choice field needs options, a name field needs a format, a default answer must be one of the options, an embed link must be one the app can embed, country rules have their own limits, and field ids must be unique. The MCP tool validate_form_document checks those too, without saving anything.
  • A form can have up to 50 fields, page breaks included, and a title of up to 200 characters.
  • An import is always a new draft; it never changes an existing form. Submissions, analytics, version history, integrations and images aren’t part of a document.
  • Features your plan doesn’t include are saved, but the published form leaves them out until you upgrade.
  • More is on the Form JSON Schema and Import and Export pages.

Frequently asked questions

Why was my form refused when it passed the schema?

Some rules can’t be written in JSON Schema. A choice field needs options, a name field needs a format, a default answer must be one of the options, and field ids must be unique. The MCP tool validate_form_document checks all of these without saving anything.

Can importing a JSON document update a form I already have?

No, an import always creates a new draft. To change an existing form from code, replace it with PATCH through the REST API.

Are submissions included when I export a form?

No. A document holds the form only. Submissions, analytics, version history, integrations and images are not part of it, so add images again in the builder after an import.

Will an older export file still import?

Documents in format versions 1 to 3 still import, and so does a file from before the product was renamed, whose version is named awesomeforms.

What happens to Smart Logic when I import a form?

The form and every field get new ids, and Smart Logic, answer piping and payment amounts are pointed at the new fields for you. A rule that names a field or option missing from the document is dropped and listed in the dropped list.

Can I import a form without an API key?

Yes. The form then belongs to a guest, and the answer includes a handoffUrl. Open that link in your browser to take the form over in the builder, then sign in to keep it. See Import and Export.

Related feature: Form JSON Schema