Skip to main content
POST
/
forms
/
generate
Generate Form with AI
curl --request POST \
  --url https://geniusforms.ai/api/v1/forms/generate \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "prompt": "Create a job application form for a software developer position"
}
'
{
  "id": 208,
  "title": "Customer Feedback",
  "description": "Help us improve our service",
  "isPublished": false,
  "shareUrl": "abc123xyz",
  "url": "https://geniusforms.ai/f/abc123xyz",
  "displayMode": "single-page",
  "createdAt": "2023-11-07T05:31:56Z",
  "publishedAt": "2023-11-07T05:31:56Z",
  "questions": [
    {
      "id": 1,
      "order": 1,
      "type": "text",
      "question": "Your name",
      "required": true,
      "options": [
        "Option A",
        "Option B"
      ],
      "conditionalLogic": {
        "showIf": {
          "questionId": 123,
          "operator": "equals",
          "value": "<string>"
        },
        "advanced": {
          "conditionGroups": [
            {
              "id": "<string>",
              "operator": "AND",
              "conditions": [
                {
                  "id": "<string>",
                  "questionId": 123,
                  "operator": "equals",
                  "value": "<string>",
                  "valueType": "static"
                }
              ]
            }
          ],
          "actions": [
            {
              "type": "show_question",
              "targetId": 123,
              "value": "<unknown>"
            }
          ],
          "scoreRules": [
            {
              "id": "<string>",
              "questionId": 123,
              "scoreMap": {}
            }
          ]
        }
      }
    }
  ]
}

Authorizations

X-API-Key
string
header
required

API key obtained from your GeniusForms dashboard

Body

application/json
prompt
string
required
Required string length: 10 - 5000
Example:

"Create a job application form for a software developer position"

title
string

Override AI-generated title

description
string

Override AI-generated description

Response

Form generated

id
integer
Example:

208

title
string
Example:

"Customer Feedback"

description
string
Example:

"Help us improve our service"

isPublished
boolean
Example:

false

shareUrl
string
Example:

"abc123xyz"

url
string
Example:

"https://geniusforms.ai/f/abc123xyz"

displayMode
enum<string>
Available options:
single-page,
multi-step
Example:

"single-page"

createdAt
string<date-time>
publishedAt
string<date-time> | null
questions
object[]