Skip to content

Forms

Build a form with AI

POST/v1/forms/generate

Start building a form from a description. It creates a draft form named "New form" and a build, and returns their ids right away. The form fills in over the next moments. Follow it with GET /v1/forms/{formId}/build and stop it with POST /v1/forms/{formId}/build/stop. You can start 20 builds an hour, and during launch an account can start 20 a day (an API key counts as the workspace's owner; workspaces made free by staff have no daily cap). Past either it answers 429 rate_limited, and the message says when you can build again. When the workspace already has all the forms its plan includes, it answers 403 plan_limit. A guest without an account gets 429 guest_limit after a few AI builds, or when the builds all guests share for the day are used up.

Body

JSON, with Content-Type: application/json.

  • brandIdstringrequired

    The brand the new form belongs to.

  • promptstringrequired

    What the form is for, in plain words. If the workspace can't use phone and email verification or AI-assisted fields, the questions AI writes leave those checks off, and an AI autocomplete question becomes a short answer. That happens when entitlements features.verification or features.aiFields is false, because of the plan or because the workspace's stage doesn't see them yet. When seeing the options helps people answer, AI may ask with pictures, in at most 2 image choice questions. Their pictures are made in the background and show up in pictures of GET /v1/forms/{formId}.

    1–2000 chars

  • clientRequestIdstringrequired

    A unique string you make up for each attempt, so retries are safe. Sending the same one again returns the same form and build.

    1–200 chars

Response

  • formIdstringrequired

    The new draft form's id.

  • buildIdstringrequired

    The build's id.

Errors answer with a status and the error shape.